This dashboard visualizes the routes taken by pieces of climate and education legislation in the state of Virginia between 2015 and 2022. This is a part of a general project looking at the patterns and potential causes of bill death within the legislative process in Virginia. The project itself is a continuation of similar projects that look at the main causes of climate bill death in the legislature of Massachusetts and Connecticut.
Looking at the contents of the dashboard, the data has been separated by year to allow for an annual analysis. There have been several sankey diagrams created that emphasize different parts of the data and graphs to give overall statistics per committee.
“Joint” sankey diagrams look at the specific committees that each bill goes through and separates the three that received the most amount of climate bills into separate nodes, so the reader can easily identify the most influential committees.
“Dead” sankey diagrams explicitly show the flow of dead bills from various parts of the political process in order to place an emphasis on the stages where the most amount of bills died.
“Return” sankey diagrams highlight the potential for a bill to follow a complex legislative path that has it go back to a previous stage with amendments. Specifically, a bill can be passed back from the second to the first chamber for approval of revisions made in the second chamber. Similarly, the governor can send a bill back through the state congress with revisions. The return sankey demonstrates this by creating a flow that goes from Floor 2 to Floor 1, and by creating a flow from the governor through both floors, at which point it is signed into law.
An “education sankey” looks at the legislative paths for identified education bills. This is to create a comparison between climate legislation and non-climate legislation to make sure patterns we find in one can be found in the other.
“Voiced” sankeys look at the differences between bills that had their votes counted via voiced vote versus not. Voiced votes are not written down, which makes it impossible to determine who voted for or against a bill. This idea was shut down after 2017, so the graphs will be available only for before then.
There is also a line graph present in each year that shows the proportion of bills that make it through each step of the process, just so there is a general idea of what is going on each year.
For this project, we have collaborated with the nonprofit organization Sierra Club. It provided us with their opinion on various bills and whether they were deemed pro-climate or not. Unfortunately, due to technical circumstances, the Virginia chapter did not have the opinions on file for 2015 and 2016, so we substituted using the priorities set up by the Metropolitan Washington Council of Local Governments. Education bills were gathered using a list of key terms and their progressiveness determined using a list of priorities from the Virginia Education Association.
The layout for each year will look something like this, with the ability to change the graph the user is looking at near the top, a table on the left to show the climate bill counts for each individual committee, and a panel containing a qualitative description of that year in addition to general state government breakdown by party. 2017 and onward will have a breakdown by opinion on whether the bill is pro or against climate.
2015 has a pattern that will be repeated for future years in having a disproportionate amount of bills die in the initial committee, with a few more dying in the second committee and few dying anywhere else. Only 43% of bills made it out of that stage of interest, which will still get alarmingly smaller in the coming years. Another fact to establish is the disproportionate influence the House Commerce & Labor committee has in the amount of bills that they receive, with its Senate counterpart and the House Agriculture, Chesapeke & Natural Resources and Senate Agriculture, Conservation & Natural Resources committees also being major players. The control sankey follows a similar pattern to the climate bills, albeit more scrutinous on account of the lack of any unanimous bills to “pad out” the flows later on in the legislative process.
This is the first year that joint resolutions are introduced, which involve passing both chambers but not needing the president’s approval. As a result they are different from a “law,” though it will still be treated as such for the sake of visualization. A joint resolution will be shown as going through the chambers and will “become a law,” skipping the governor entirely.
2016 had a different congressional makeup on account of 2015 midterm elections, with democrats gaining a seat in the House but had Republicans retain a supermajority. This year has a similar pattern to the previous year, with most of the bills dying off in the first committee and only 42% making it through. Future years will introduce a new aspect to the graphs in showing the amount of bills deemed pro-climate or not, which we will see will make a difference in terms of how likely a bill is to be passed.
Looking at the control Sankey, an interesting pattern emerges. Though both voiced and recorded votes died in massive rates, bills that held a voiced vote died in disproportionate rates. 2015 had no voiced bills pass. 2016 had 40% of introduced bills held to a voice vote, while only ~13% of bills that were passed into law were voiced. This suggests the correlation that voiced bills are less likely to be passed into law, even less than non-unanimous in general are.
2017 gives us an insight into just how many pro-climate bills end up dying in the committees compared to other climate bills. This is especially apparent when looking at the proportional line graph, with neutral and negative bills all being more likely (over 50%) to make it out of that initial committee compared to pro-climate legislation (27%). The control diagram offers a similar story, with many more voice vote bills dying compared to recorded. This pattern will continue for the most part, with many bills dying within the committee, with pro-climate and voice-vote bills being predominantly targetted.
One unique characteristic to this year is it has a the smallest proportion of positive bills out of all the years studied. Only 55% of the bills were supported by Sierra Club. This is contrary to future sessions where 70+% of bills are supported by Sierra Club.
This year is more drastic than 2017. Control over congress and governorship has not changed, but there was a bit of reshuffling done through house elections, losing republicans their supermajority from the previous year. In addition, there was the election of Governor Northam, who presided over all future legislature we are currently analyzing. A higher proportion of bills ended up dying in their initial committees, with barely any dying afterwards. The difference in procedure between the initial committee hearings and debate held elsewhere is that committee hearings are public. This means it is impossible, through public means, to determine what exactly occured that caused the bill to die. The votes are secret, as well as the conversation that occurs between congresspeople.
The pattern from previous years is once again replicated in 2019! Deaths within the committee are numerous, while elsewhere they are not. Pro-Climate bills are still the most disproportionately affected, though climate-neutral and opposing bills are also affected.
There are a couple of hypothesis that can be presented as to why this pattern has appeared again and again. The first is that a number of these bills are genuinely problematic and do not need to be considered on the Floor. The second hypothesis is more dire: the privacy of committee voting is intentionally being used to kill off legislation that officials do not want to go in public as being against. There are a couple of issues with the first line of thinking. On a more practical level, that legislation simply would not have been introduced in the first place were it problematic. On a more imperical level, were this hypothesis true then it would be expected to hold in the instance that there is a shift in party control. This shift in party ended up occuring in 2020.
2019 elections had democrats sweeping Virginian State Congress on account of anti-Trump rhetoric, giving democrats trifecta control for the first time in 20 years. This appears to have lead to sizably more pro-climate bills making it through the first committee. There were still proportionally the same amount of pro-climate bills being introduced compared to other years (with the exception of 2017) at ~80% positive. This demonstrates a strong correlation between control of the legislative bodies and whether those bodies choose to take advantage of the opaqueness of the committees to have bills thrown out in the initial committee overview.
That aside, a lot of the bills still end up dying within that unaccountable committee. We have no public way of knowing the specific reason for why that is the case. We can only see that bills have been passing in a less discriminatory manner and make inferences from that. One inference that we cannot make is that the bills are simply just problematic and not worth considering on the floor. If that were the case, the bills this year would have been targetted much more in the committee level. As a result, a more likely inference is that the legislative structure is being taken advantage of to varying degrees depending on the party control.
In addition, there was a lot more action with various bills (amendments/recommendations, close votes, etc.) that cannot be shown within the restraints of the current graphic and will be shown in more detail in the “Other graphic forms” tab.
This year was exceptional for Sierra Club-supported legislation. Not only were ~90% of the bills supported by the organization, but an unprecedented amount of bills ended up passing the initial hurdle of the first committee. In addition, there are a sizable amount of joint resolutions this year, which as stated are not laws but still abide by a legislative process and are included as such.
That congratulatory news aside, it is even in this favored environment still has most dead bills die in the committee. There are no public voting records, not much in general to go off why they were rejected. This becomes problematic within a democratic society where an active citizen would want to know which congresspeople voted for what and what their specific opinion on a bill was. Sure, the amount killed off this year has been smaller, but we still do not know the reason why or much of anything.
An interesting note to be made is that the control sankey diagram does not have any bills that get past the second committee. This is strange for a couple of reasons: 1. There was a democratic trifecta present, which would have increased the amount of passed bills, and 2. 2020 had a democratic trifecta as well and the control sankey there reflected the climate legislation passed that year, with more control bills passing through. There was an issue with random bill generation for this particular year that resulted in non-passed bills being more influential than usual, so take this year’s control sankey with caution.
This year is the first year in almost a decade when a Republican governor took office in Virginia. Aside from that, bill-passing levels have regressed back to pre-2020 levels.
This is currently the final year of the Virginia Climate Case Study.
Here are a handful of tables for Dr. Scerri’s accompanying report
| 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | |
|---|---|---|---|---|---|---|---|---|
| Bill Introduced | 85 | 74 | 89 | 109 | 92 | 91 | 75 | 131 |
| Passed Committee 1 | 36 | 28 | 37 | 28 | 38 | 55 | 52 | 60 |
| Passed Floor 1 | 34 | 28 | 36 | 27 | 36 | 55 | 51 | 60 |
| Passed Committee 2 | 28 | 26 | 34 | 26 | 32 | 46 | 43 | 42 |
| Passed Floor 2 | 28 | 26 | 33 | 25 | 32 | 46 | 42 | 40 |
| Delivered to Governor | 25 | 26 | 32 | 24 | 30 | 43 | 39 | 40 |
| Signed into Law | 25 | 24 | 30 | 23 | 28 | 43 | 39 | 38 |
Trajectory of bills per Sierra Club position
| 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | |||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Bill Introduced | 48 | 28 | 9 | 44 | 19 | 11 | 49 | 21 | 19 | 87 | 8 | 14 | 68 | 14 | 10 | 73 | 6 | 12 | 67 | 1 | 7 | 87 | 1 | 43 |
| Passed Committee 1 | 19 | 15 | 2 | 12 | 11 | 5 | 13 | 12 | 12 | 20 | 4 | 4 | 24 | 9 | 5 | 47 | 5 | 3 | 49 | 1 | 2 | 36 | 1 | 23 |
| Passed Floor 1 | 18 | 14 | 2 | 12 | 11 | 5 | 12 | 12 | 12 | 19 | 4 | 4 | 22 | 9 | 5 | 47 | 5 | 3 | 48 | 1 | 2 | 36 | 1 | 23 |
| Passed Committee 2 | 18 | 9 | 1 | 11 | 11 | 4 | 12 | 12 | 10 | 18 | 4 | 4 | 20 | 7 | 5 | 40 | 5 | 1 | 40 | 1 | 2 | 28 | 1 | 13 |
| Passed Floor 2 | 18 | 9 | 1 | 11 | 11 | 4 | 12 | 12 | 9 | 17 | 4 | 4 | 20 | 7 | 5 | 40 | 5 | 1 | 39 | 1 | 2 | 28 | 1 | 11 |
| Delivered to Governor | 16 | 8 | 1 | 11 | 11 | 4 | 12 | 12 | 8 | 17 | 3 | 4 | 18 | 7 | 5 | 37 | 5 | 1 | 37 | 1 | 1 | 28 | 1 | 11 |
| Signed into Law | 16 | 8 | 1 | 9 | 11 | 4 | 12 | 12 | 6 | 17 | 3 | 3 | 18 | 7 | 3 | 37 | 5 | 1 | 37 | 1 | 1 | 26 | 1 | 11 |
| 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | |
|---|---|---|---|---|---|---|---|---|
| Bill Introduced | 107 | 105 | 88 | 118 | 98 | 128 | 42 | 97 |
| Passed Committee 1 | 46 | 41 | 38 | 40 | 56 | 67 | 30 | 44 |
| Passed Floor 1 | 44 | 39 | 36 | 40 | 53 | 67 | 30 | 44 |
| Passed Committee 2 | 33 | 35 | 32 | 31 | 34 | 60 | 26 | 30 |
| Passed Floor 2 | 33 | 33 | 28 | 31 | 33 | 59 | 26 | 29 |
| Delivered to Governor | 33 | 32 | 28 | 31 | 33 | 58 | 25 | 29 |
| Signed into Law | 31 | 27 | 25 | 31 | 32 | 58 | 25 | 29 |
| 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | |||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Bill Introduced | 21 | 85 | 1 | 17 | 88 | 0 | 33 | 52 | 3 | 35 | 83 | 0 | 32 | 65 | 1 | 36 | 91 | 1 | 14 | 27 | 1 | 15 | 78 | 4 |
| Passed Committee 1 | 8 | 38 | 0 | 5 | 36 | 0 | 16 | 21 | 1 | 11 | 29 | 0 | 15 | 40 | 1 | 16 | 51 | 0 | 10 | 20 | 0 | 9 | 33 | 2 |
| Passed Floor 1 | 8 | 36 | 0 | 5 | 34 | 0 | 15 | 20 | 1 | 11 | 29 | 0 | 15 | 37 | 1 | 16 | 51 | 0 | 10 | 20 | 0 | 9 | 33 | 2 |
| Passed Committee 2 | 4 | 29 | 0 | 4 | 31 | 0 | 14 | 18 | 0 | 6 | 25 | 0 | 10 | 23 | 1 | 15 | 45 | 0 | 7 | 19 | 0 | 5 | 24 | 1 |
| Passed Floor 2 | 4 | 29 | 0 | 4 | 29 | 0 | 10 | 18 | 0 | 6 | 25 | 0 | 9 | 23 | 1 | 15 | 44 | 0 | 7 | 19 | 0 | 4 | 24 | 1 |
| Delivered to Governor | 4 | 29 | 0 | 3 | 29 | 0 | 10 | 18 | 0 | 6 | 25 | 0 | 9 | 23 | 1 | 14 | 44 | 0 | 6 | 19 | 0 | 4 | 24 | 1 |
| Signed into Law | 4 | 27 | 0 | 3 | 24 | 0 | 10 | 15 | 0 | 6 | 25 | 0 | 9 | 22 | 1 | 14 | 44 | 0 | 6 | 19 | 0 | 4 | 24 | 1 |
---
title: "Climate Legislature Visualizations"
output:
flexdashboard::flex_dashboard:
source_code: embed
theme: united
---
```{r global, echo=FALSE}
library(bslib)
library(flexdashboard)
library(plotly)
library(ggplot2)
library(plyr)
library(reactable)
source("functions.R")
csv15 <- read.csv("data/csv_2015.csv") %>% col_care() %>% add_identifiers() %>% mutate(Year = 2015) %>%
separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";")
csv16 <- read.csv("data/csv_2016.csv", nrows = 74) %>% col_care() %>% add_identifiers() %>% mutate(Year = 2016) %>%
separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";")
csv17 <- read.csv("data/csv_2017.csv", nrows = 89) %>% col_care() %>% add_identifiers() %>% mutate(Year = 2017) %>%
separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";")
csv18 <- read.csv("data/csv_2018.csv", nrows = 111) %>% col_care() %>% add_identifiers() %>% mutate(Year = 2018) %>%
separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";")
csv19 <- read.csv("data/csv_2019.csv", nrows = 92) %>% col_care() %>% add_identifiers() %>% mutate(Year = 2019) %>%
separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";")
csv20 <- read.csv("data/csv_2020.csv", nrows = 92) %>% col_care() %>% add_identifiers() %>% mutate(Year = 2020) %>%
separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";")
csv21 <- read.csv("data/csv_2021.csv", nrows = 84) %>% col_care() %>% add_identifiers() %>% mutate(Year = 2021) %>%
separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";")
csv22 <- read.csv("data/csv_2022.csv", nrows = 132) %>% col_care() %>% add_identifiers() %>% mutate(Year = 2022) %>%
separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";")
csv23 <- read.csv("data/csv_2023.csv", nrows = 132) %>% col_care() %>% add_identifiers() %>% mutate(Year = 2023) %>%
separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";")
csv_total <- rbind(csv15, csv16, csv17, csv18, csv19, csv20, csv21, csv22, csv23)
colors <- list("y2015" = "4f2e39", "y2016" = "8f2d56", "y2017" = "ef476f", "y2018" = "e16036", "y2019" = "ffd166", "y2020" = "06d6a0", "y2021" = "118ab2", "y2022" = "073b4c", "y2023" = "b0d1c6",
"dead" = "6a5d5d")
labs <- c("Introduced", "Committee 1", "Floor 1",
"Committee 2", "Floor 2",
"Delivered to Governor", "Signed by Governor", "Law", "Dead")
# Old link hover doesn't include expanded acronym
#link_hover <- paste("Flow between %{source.label}
",
# "and %{target.label}",
# "%{value:.0f} ")
link_hover <- paste("Flow between %{customdata[0]}
",
"and %{customdata[1]}",
"%{value:.0f} ")
node_hover <- paste("%{customdata}",
"%{value:.0f} ")
# Stuff for General Overview
joint_year <- rbind(
data_creator(csv15, colors$y2015),
data_creator(csv16, colors$y2016),
data_creator(csv17, colors$y2017),
data_creator(csv18, colors$y2018),
data_creator(csv19, colors$y2019),
data_creator(csv20, colors$y2020),
data_creator(csv21, colors$y2021),
data_creator(csv22, colors$y2022),
data_creator(csv23, colors$y2023)
)
# Adds committees
csv_com_total <- separate(csv_total, Com.1, into = "Com.1", sep = ";") %>%
mutate(Com.1 = if_else(Com.1 == "H-CL" | Com.1 == "H-LC", "H-CL/LC", Com.1),
Com.2 = if_else(Com.2 == "H-CL" | Com.2 == "H-LC", "H-CL/LC", Com.2))
committees_total <- com_sierra(csv_com_total)
labels_total <- c("Introduced", levels(committees_total$x)[2:4], "Other Committee", "Passed Floor 1", gsub(".{2}$", "", levels(committees_total$x)[7:9]), "Other Committee", "Passed Floor 2", "Delivered to Governor", "Signed by Governor", "Passed")
com_15 <- com_sierra(csv15)
com_16 <- com_sierra(csv16)
com_17 <- com_sierra(csv17)
com_18 <- com_sierra(csv18)
com_19 <- com_sierra(csv19)
com_20 <- com_sierra(csv20)
com_21 <- com_sierra(csv21)
com_22 <- com_sierra(csv22)
com_23 <- com_sierra(csv23)
labels_15 <- c("Introduced", levels(com_15$x)[2:4], "Other Committee", "Passed Floor 1", gsub(".{2}$", "", levels(com_15$x)[7:9]), "Other Committee", "Passed Floor 2", "Delivered to Governor", "Signed by Governor", "Law")
labels_16 <- c("Introduced", levels(com_16$x)[2:4], "Other Committee", "Passed Floor 1", gsub(".{2}$", "", levels(com_16$x)[7:9]), "Other Committee", "Passed Floor 2", "Delivered to Governor", "Signed by Governor", "Law")
labels_17 <- c("Introduced", levels(com_17$x)[2:4], "Other Committee", "Passed Floor 1", gsub(".{2}$", "", levels(com_17$x)[7:9]), "Other Committee", "Passed Floor 2", "Delivered to Governor", "Signed by Governor", "Law")
labels_18 <- c("Introduced", levels(com_18$x)[2:4], "Other Committee", "Passed Floor 1", gsub(".{2}$", "", levels(com_18$x)[7:9]), "Other Committee", "Passed Floor 2", "Delivered to Governor", "Signed by Governor", "Law")
labels_19 <- c("Introduced", levels(com_19$x)[2:4], "Other Committee", "Passed Floor 1", gsub(".{2}$", "", levels(com_19$x)[7:9]), "Other Committee", "Passed Floor 2", "Delivered to Governor", "Signed by Governor", "Law")
labels_20 <- c("Introduced", levels(com_20$x)[2:4], "Other Committee", "Passed Floor 1", gsub(".{2}$", "", levels(com_20$x)[7:9]), "Other Committee", "Passed Floor 2", "Delivered to Governor", "Signed by Governor", "Law")
labels_21 <- c("Introduced", levels(com_21$x)[2:4], "Other Committee", "Passed Floor 1", gsub(".{2}$", "", levels(com_21$x)[7:9]), "Other Committee", "Passed Floor 2", "Delivered to Governor", "Signed by Governor", "Law")
labels_22 <- c("Introduced", levels(com_22$x)[2:4], "Other Committee", "Passed Floor 1", gsub(".{2}$", "", levels(com_22$x)[7:9]), "Other Committee", "Passed Floor 2", "Delivered to Governor", "Signed by Governor", "Law")
labels_23 <- c("Introduced", levels(com_23$x)[2:4], "Other Committee", "Passed Floor 1", gsub(".{2}$", "", levels(com_23$x)[7:9]), "Other Committee", "Passed Floor 2", "Delivered to Governor", "Signed by Governor", "Law")
null15 <- read.csv("data/null_ed_2015.csv") %>% mutate(Year = 2015) %>% separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";") %>% mutate(SC.Position = VEA.Support)
null16 <- read.csv("data/null_ed_2016.csv") %>% mutate(Year = 2016) %>% separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";") %>% mutate(SC.Position = VEA.Support)
null17 <- read.csv("data/null_ed_2017.csv") %>% mutate(Year = 2017) %>% separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";") %>% mutate(SC.Position = VEA.Support)
null18 <- read.csv("data/null_ed_2018.csv") %>% mutate(Year = 2018) %>% separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";") %>% mutate(SC.Position = VEA.Support)
null19 <- read.csv("data/null_ed_2019.csv") %>% mutate(Year = 2019) %>% separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";") %>% mutate(SC.Position = VEA.Support)
null20 <- read.csv("data/null_ed_2020.csv") %>% mutate(Year = 2020) %>% separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";") %>% mutate(SC.Position = VEA.Support)
null21 <- read.csv("data/null_ed_2021.csv") %>% mutate(Year = 2021) %>% separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";") %>% mutate(SC.Position = VEA.Support)
null22 <- read.csv("data/null_ed_2022.csv") %>% mutate(Year = 2022) %>% separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";") %>% mutate(SC.Position = VEA.Support)
vv_15 <- com_sierra(null15)
vv_16 <- com_sierra(null16)
vv_17 <- com_sierra(null17)
vv_18 <- com_sierra(null18)
vv_19 <- com_sierra(null19)
vv_20 <- com_sierra(null20)
vv_21 <- com_sierra(null21)
vv_22 <- com_sierra(null22)
labels_ed_15 <- c("Introduced", levels(vv_15$x)[2:4], "Other Committee", "Passed Floor 1", gsub(".{2}$", "", levels(vv_15$x)[7:9]), "Other Committee", "Passed Floor 2", "Delivered to Governor", "Signed by Governor", "Law")
labels_ed_16 <- c("Introduced", levels(vv_16$x)[2:4], "Other Committee", "Passed Floor 1", gsub(".{2}$", "", levels(vv_16$x)[7:9]), "Other Committee", "Passed Floor 2", "Delivered to Governor", "Signed by Governor", "Law")
labels_ed_17 <- c("Introduced", levels(vv_17$x)[2:4], "Other Committee", "Passed Floor 1", gsub(".{2}$", "", levels(vv_17$x)[7:9]), "Other Committee", "Passed Floor 2", "Delivered to Governor", "Signed by Governor", "Law")
labels_ed_18 <- c("Introduced", levels(vv_18$x)[2:4], "Other Committee", "Passed Floor 1", gsub(".{2}$", "", levels(vv_18$x)[7:9]), "Other Committee", "Passed Floor 2", "Delivered to Governor", "Signed by Governor", "Law")
labels_ed_19 <- c("Introduced", levels(vv_19$x)[2:4], "Other Committee", "Passed Floor 1", gsub(".{2}$", "", levels(vv_19$x)[7:9]), "Other Committee", "Passed Floor 2", "Delivered to Governor", "Signed by Governor", "Law")
labels_ed_20 <- c("Introduced", levels(vv_20$x)[2:4], "Other Committee", "Passed Floor 1", gsub(".{2}$", "", levels(vv_20$x)[7:9]), "Other Committee", "Passed Floor 2", "Delivered to Governor", "Signed by Governor", "Law")
labels_ed_21 <- c("Introduced", levels(vv_21$x)[2:4], "Other Committee", "Passed Floor 1", gsub(".{2}$", "", levels(vv_21$x)[7:9]), "Other Committee", "Passed Floor 2", "Delivered to Governor", "Signed by Governor", "Law")
labels_ed_22 <- c("Introduced", levels(vv_22$x)[2:4], "Other Committee", "Passed Floor 1", gsub(".{2}$", "", levels(vv_22$x)[7:9]), "Other Committee", "Passed Floor 2", "Delivered to Governor", "Signed by Governor", "Law")
null_total <- rbind(null15, null16, null17, null18, null19, null20, null21, null22)
vv_total <- com_sierra(null_total)
```
# Sidebar {.sidebar data-width=200}
### Legend
```{r}
# library(cowplot)
# library(grid)
# library(gridExtra)
# library(ggpubr)
# # A bunch of spaces added after 2015 to line everything up
# base_graph <- ggplot(csv_total, aes(Year, fill = as.character(Year))) + geom_bar() +
# scale_fill_manual(
# values = c("2015" = paste("#",colors$y2015, sep = ""),"2016" = paste("#",colors$y2016, sep = ""), "2017" = paste("#",colors$y2017, sep = ""),"2018" = paste("#",colors$y2018, sep = ""),"2019" = paste("#",colors$y2019, sep = ""),
# "2020" = paste("#",colors$y2020, sep = ""),"2021" = paste("#",colors$y2021, sep = ""), "2022" = paste("#", colors$y2022, sep = ""), "2023" = paste("#", colors$y2023, sep = ""))) +
# theme_minimal() +
# labs(title = "Fate of Different Bills in Relation to Sierra Club's Position in 2017 and 2018",
# x = "Final Outcome of Bill", y = "Number of Bills",
# fill = "Year") +
# theme(legend.text = element_text(size = 13),
# legend.title = element_text(size = 18),
# legend.key.size = unit(1.5, "cm"))
# legend_year <- get_legend(base_graph)
# gg17 <- ggplot(csv_total, aes(Dis, fill = Pos)) + geom_bar() +
# scale_fill_manual(
# values = c("Supported" = "#9ACD32", "Neutral" = "#B0E0E6", "Opposed" = "#FF4500", "NA" = "#BEC4C6")) +
# theme_minimal() +
# scale_x_discrete(limits = c("Died in Committee", "Died Elsewhere", "Passed into Law")) +
# labs(title = "Fate of Different Bills in Relation to Sierra Club's Position in 2017 and 2018",
# x = "Final Outcome of Bill", y = "Number of Bills",
# fill = "Sierra/VEA Position") +
# theme(legend.text = element_text(size = 13),
# legend.title = element_text(size = 18),
# legend.key.size = unit(1.8, "cm"))
# legend_sierra <- get_legend(gg17)
# vv17 <- ggplot(mutate(null_total, VV = if_else(VV == 1, "Voiced", "Recorded")), aes(VV, fill = VV)) + geom_bar() +
# scale_fill_manual(values = c( "Voiced" = "#7b955b", "Recorded" = "#B53543")) +
# theme_minimal() +
# labs(title = "Fate of Different Bills in Relation to Sierra Club's Position in 2017 and 2018",
# x = "Final Outcome of Bill", y = "Number of Bills",
# fill = "Vote Type") +
# theme(legend.text = element_text(size = 13),
# legend.title = element_text(size = 18),
# legend.key.size = unit(1.8, "cm"))
# legend_vv <- get_legend(vv17)
# plot_grid(legend_year, legend_sierra, legend_vv, nrow = 3, ncol = 1, rel_heights = c(0.6,0.33,0.2))
# ggsave("legend.png", bg = "transparent")
```
{#id .class width=80% height=80%}
# General Overview {data-orientation=columns}
Column {.tabset data-width=1000}
-------------------------------------
### Bill Lifetime per Year
```{r}
JOINT_YEAR <- plot_ly(
domain = list(x = c(0, 1), y = c(0.51, 1)),
type = "sankey",
arrangement = "snap",
node = list(
label = labs,
customdata = node_names(labs),
x = c(0, 0.13, 0.2, 0.33, 0.5, 0.63, 0.81, 1, 1),
y = c(0.5, 0.49, 0.20, 0.20, 0.20, 0.24, 0.17, 0.17, 0),
color = "gray",
hovertemplate = node_hover,
thickness = 10,
pad = 10),
link = list(
source = as.numeric(joint_year$x) - 1,
target = as.numeric(joint_year$next_x) - 1,
customdata = flow_names(joint_year),
value = joint_year$n,
color = ~as.factor(joint_year$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
)) %>%
layout(title = "General Sankey Diagrams for 2015-2023",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
sierra_joint <- sierra_data(csv_total)
SIERRA_YEAR <- plot_ly(
domain = list(x = c(0, 1), y = c(0, 0.49)),
type = "sankey",
arrangement = "snap",
node = list(
label = labs,
customdata = node_names(labs),
x = c(0, 0.13, 0.2, 0.33, 0.5, 0.63, 0.81, 1, 1),
y = c(0.5, 0.49, 0.20, 0.20, 0.20, 0.24, 0.17, 0.17, 0),
color = "gray",
hovertemplate = node_hover,
pad = 10,
thickness = 10), # 10 Pixel
link = list(
source = as.numeric(sierra_joint$x) - 1,
target = as.numeric(sierra_joint$next_x) - 1,
customdata = flow_names(sierra_joint),
value = sierra_joint$n,
color = ~as.factor(sierra_joint$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
)) %>%
layout(title = "General Sankey Diagrams for 2015-2021",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
subplot(JOINT_YEAR, SIERRA_YEAR, nrows = 2)
```
### Joint Overview
```{r}
yearly_sierra_joint <- plot_ly(
domain = list(x = c(0, 1), y = c(0, 0.49)),
type = "sankey",
arrangement = "snap",
node = list(
label = labels_total,
customdata = node_names(labels_total),
x = c(0, 0.15, 0.15, 0.15, 0.15, 0.25, 0.4, 0.4, 0.4, 0.4, 0.5, 0.65, 0.8, 1),
y = c(0, -0.2, 0.18, 0.22, 0.75, 0.5, 0.32, 0.38, 0.42, 0.72, 0.5, 0.6, 0.5, 0.5),
color = "gray",
hovertemplate = node_hover,
thickness = 10,
pad = 10), # 10 Pixel
link = list(
source = as.numeric(committees_total$x) - 1,
target = as.numeric(committees_total$next_x),
customdata = flow_names(committees_total),
value = committees_total$n,
color = ~as.factor(committees_total$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
))%>%
layout(title = "General Sankeys Separated by Committee",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
com_year_parts <- consolidate_com(csv_com_total)
levs <- c("Intro.Com", "H-CL/LC", "H-ACNR", "S-CL", "Other.Committee", "Pass.Floor.1", "S-CL.2", "S-ACNR.2", "H-CL/LC.2", "Other.Committee.2", "Pass.Floor.2", "To.Gov", "Passed", "Law")
com_year_total <- rbind(
com_creator(filter(com_year_parts, Year == 2015), colors$y2015, consol = FALSE),
com_creator(filter(com_year_parts, Year == 2016), colors$y2016, consol = FALSE),
com_creator(filter(com_year_parts, Year == 2017), colors$y2017, consol = FALSE),
com_creator(filter(com_year_parts, Year == 2018), colors$y2018, consol = FALSE),
com_creator(filter(com_year_parts, Year == 2019), colors$y2019, consol = FALSE),
com_creator(filter(com_year_parts, Year == 2020), colors$y2020, consol = FALSE),
com_creator(filter(com_year_parts, Year == 2021), colors$y2021, consol = FALSE),
com_creator(filter(com_year_parts, Year == 2022), colors$y2022, consol = FALSE)
) %>%
mutate(x = factor(as.character(x), levels = levs), next_x = factor(as.character(next_x), levels = levs))
yearly_joint <- plot_ly(
domain = list(x = c(0, 1), y = c(0.51, 1)),
type = "sankey",
arrangement = "snap",
node = list(
label = labels_total,
customdata = node_names(labels_total),
x = c(0, 0.15, 0.15, 0.15, 0.15, 0.25, 0.4, 0.4, 0.4, 0.4, 0.5, 0.65, 0.8, 1),
y = c(0, -0.2, 0.18, 0.22, 0.75, 0.5, 0.32, 0.38, 0.42, 0.72, 0.5, 0.6, 0.5, 0.5),
color = "gray",
hovertemplate = node_hover,
thickness = 10,
pad = 10), # 10 Pixel
link = list(
source = as.numeric(com_year_total$x) - 1,
target = as.numeric(com_year_total$next_x) - 1,
customdata = flow_names(com_year_total),
value = com_year_total$n,
color = ~as.factor(com_year_total$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
))%>%
layout(title = "General Sankeys Separated by Committee",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
subplot(yearly_sierra_joint, yearly_joint, nrows = 2)
```
### Dead Overview
```{r}
deadtotal <- sierra_data_dead(csv_total)
labs <- c("Introduced", "Passed Committee 1", "Passed Floor 1",
"Passed Committee 2", "Passed Floor 2",
"Delivered to Governor", "Signed by Governor", "Law", "Dead")
sierra_dead <- plot_ly(
domain = list(x = c(0, 1), y = c(0, 0.49)),
type = "sankey",
arrangement = "snap",
node = list(
label = labs,
customdata = node_names(labs),
x = c(0, 0.23, 0.29, 0.40, 0.55, 0.67, 0.82, 1, 1),
y = c(0.2, 0.5, 0.23, 0.18, 0.14, 0.21, -0.1, -0.1, 0.7),
color = "gray",
hovertemplate = node_hover,
pad = 10), # 10 Pixel
link = list(
source = as.numeric(deadtotal$x) - 1,
target = as.numeric(deadtotal$next_x) - 1,
customdata = flow_names(deadtotal),
value = deadtotal$n,
color = ~as.factor(deadtotal$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
))%>%
layout(title = "Sankey Diagrams with Dead Bills 2015-2022",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
dead_year_total <- rbind(
data_creator_dead(filter(csv_total, Year == 2015), colors$y2015),
data_creator_dead(filter(csv_total, Year == 2016), colors$y2016),
data_creator_dead(filter(csv_total, Year == 2017), colors$y2017),
data_creator_dead(filter(csv_total, Year == 2018), colors$y2018),
data_creator_dead(filter(csv_total, Year == 2019), colors$y2019),
data_creator_dead(filter(csv_total, Year == 2020), colors$y2020),
data_creator_dead(filter(csv_total, Year == 2021), colors$y2021),
data_creator_dead(filter(csv_total, Year == 2022), colors$y2022)
) %>% color_dead()
yearly_dead <- plot_ly(
domain = list(x = c(0, 1), y = c(0.51, 1)),
type = "sankey",
arrangement = "snap",
node = list(
label = labs,
customdata = node_names(labs),
x = c(0, 0.23, 0.29, 0.40, 0.55, 0.67, 0.82, 1, 1),
y = c(0.2, 0.5, 0.23, 0.18, 0.14, 0.21, -0.1, -0.1, 0.7),
color = "gray",
hovertemplate = node_hover,
pad = 10), # 10 Pixel
link = list(
source = as.numeric(dead_year_total$x) - 1,
target = as.numeric(dead_year_total$next_x) - 1,
customdata = flow_names(dead_year_total),
value = dead_year_total$n,
color = ~as.factor(dead_year_total$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
))%>%
layout(title = "Sankey Diagrams with Dead Bills 2015-2022",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
subplot(sierra_dead, yearly_dead, nrows = 2)
```
### Return Sankey
```{r}
shelltotal <- sierra_data_shell(csv_total)
labs <- c("Introduced", "Passed Committee 1", "Passed Floor 1",
"Passed Committee 2", "Passed Floor 2",
"Delivered to Governor", "Signed", "Law", "Dead")
return_sierra <- plot_ly(
domain = list(x = c(0, 1), y = c(0, 0.49)),
type = "sankey",
arrangement = "snap",
node = list(
label = labs,
customdata = node_names(labs),
x = c(0, 0.23, 0.35, 0.5, 0.6, 0.7, 0.9),
y = c(0.5, 0.5, 0.5, 0.29, 0.4, 0.5, 0.3),
color = "gray",
hovertemplate = node_hover,
pad = 10), # 10 Pixel
link = list(
source = as.numeric(shelltotal$x) - 1,
target = as.numeric(shelltotal$next_x) - 1,
customdata = flow_names(shelltotal),
value = shelltotal$n,
color = ~as.factor(shelltotal$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
)) %>%
layout(title = "Sankey Diagrams with Returned Bills 2015-2022",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
shelltotal_year <- rbind(
data_creator_shell(filter(csv_total, Year == 2015), colors$y2015),
data_creator_shell(filter(csv_total, Year == 2016), colors$y2016),
data_creator_shell(filter(csv_total, Year == 2017), colors$y2017),
data_creator_shell(filter(csv_total, Year == 2018), colors$y2018),
data_creator_shell(filter(csv_total, Year == 2019), colors$y2019),
data_creator_shell(filter(csv_total, Year == 2020), colors$y2020),
data_creator_shell(filter(csv_total, Year == 2021), colors$y2021),
data_creator_shell(filter(csv_total, Year == 2022), colors$y2022)
)
return_year <- plot_ly(
domain = list(x = c(0, 1), y = c(0.51, 1)),
type = "sankey",
arrangement = "snap",
node = list(
label = labs,
customdata = node_names(labs),
x = c(0, 0.23, 0.35, 0.5, 0.6, 0.72, 0.9),
y = c(0.5, 0.5, 0.5, 0.29, 0.4, 0.5, 0.3),
color = "gray",
hovertemplate = node_hover,
pad = 10), # 10 Pixel
link = list(
source = as.numeric(shelltotal_year$x) - 1,
target = as.numeric(shelltotal_year$next_x) - 1,
customdata = flow_names(shelltotal_year),
value = shelltotal_year$n,
color = ~as.factor(shelltotal_year$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
)) %>%
layout(title = "Sankey Diagrams with Returned Bills 2015-2022",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
subplot(return_sierra, return_year, nrows = 2)
```
### Education Sankey
```{r}
null_total_consol <- consolidate_com(null_total)
levs <- c("Introduced", levels(vv_total$x)[2:4], "Other Committee", "Passed Floor 1", "Passed Committee 2", "Passed Floor 2", "Delivered to Governor", "Signed by Governor", "Law")
null_vv_total <- rbind(
data_creator(filter(null_total_consol, VV == 1), "rgba(123,149,91,1.0)"),
data_creator(filter(null_total_consol, VV == 0), "rgba(181,53,67,1.0)")
)
null_total_graph <- plot_ly(
domain = list(x = c(0, 1), y = c(0, 0.49)),
type = "sankey",
arrangement = "snap",
node = list(
label = labs,
customdata = node_names(labs),
x = c(0, 0.13, 0.2, 0.33, 0.5, 0.63, 0.81, 1, 1),
y = c(0.5, 0.49, 0.20, 0.20, 0.20, 0.20, 0.17, 0.17, 0),
color = "gray",
hovertemplate = node_hover,
thickness = 10,
pad = 10),
link = list(
source = as.numeric(null_vv_total$x) - 1,
target = as.numeric(null_vv_total$next_x) - 1,
customdata = flow_names(null_vv_total),
value = null_vv_total$n,
color = ~as.factor(null_vv_total$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
)) %>%
layout(title = "Sankey Diagrams Sampling All Non-Climate Bills 2015-2022",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
null_year_total <- rbind(
data_creator(filter(null_total_consol, Year == 2015), colors$y2015),
data_creator(filter(null_total_consol, Year == 2016), colors$y2016),
data_creator(filter(null_total_consol, Year == 2017), colors$y2017),
data_creator(filter(null_total_consol, Year == 2018), colors$y2018),
data_creator(filter(null_total_consol, Year == 2019), colors$y2019),
data_creator(filter(null_total_consol, Year == 2020), colors$y2020),
data_creator(filter(null_total_consol, Year == 2021), colors$y2021),
data_creator(filter(null_total_consol, Year == 2022), colors$y2022)
)
null_year_graph <- plot_ly(
domain = list(x = c(0, 1), y = c(0.51, 1)),
type = "sankey",
arrangement = "snap",
node = list(
label = labs,
customdata = node_names(labs),
x = c(0, 0.13, 0.2, 0.33, 0.5, 0.63, 0.81, 1, 1),
y = c(0.5, 0.49, 0.20, 0.20, 0.20, 0.20, 0.17, 0.17, 0),
color = "gray",
hovertemplate = node_hover,
thickness = 10,
pad = 10),
link = list(
source = as.numeric(null_year_total$x) - 1,
target = as.numeric(null_year_total$next_x) - 1,
customdata = flow_names(null_year_total),
value = null_year_total$n,
color = ~as.factor(null_year_total$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
)) %>%
layout(title = "Sankey Diagrams Sampling All Non-Climate Bills 2015-2022",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
subplot(null_total_graph, null_year_graph, nrows = 2)
```
### Line Graph
```{r}
line_graph(csv_total, "Total")
```
Column
-------------------------------------
### Introduction
This dashboard visualizes the routes taken by pieces of climate and education legislation in the state of Virginia between 2015 and 2022.
This is a part of a general project looking at the patterns and potential causes of bill death within the legislative process in Virginia.
The project itself is a continuation of similar projects that look at the main causes of climate bill death in the legislature of [Massachusetts](https://cssn.org/wp-content/uploads/2021/01/MA-CSSN-Report-1.20.2021-Corrected-text.pdf) and [Connecticut](https://cssn.org/wp-content/uploads/2021/12/CT-CSSN-Research-Report.pdf).
Looking at the contents of the dashboard, the data has been separated by year to allow for an annual analysis.
There have been several sankey diagrams created that emphasize different parts of the data and graphs to give overall statistics per committee.
"Joint" sankey diagrams look at the specific committees that each bill goes through and separates the three that received the most amount of climate bills into separate nodes, so the reader can easily identify the most influential committees.
"Dead" sankey diagrams explicitly show the flow of dead bills from various parts of the political process in order to place an emphasis on the stages where the most amount of bills died.
"Return" sankey diagrams highlight the potential for a bill to follow a complex legislative path that has it go back to a previous stage with amendments.
Specifically, a bill can be passed back from the second to the first chamber for approval of revisions made in the second chamber.
Similarly, the governor can send a bill back through the state congress with revisions.
The return sankey demonstrates this by creating a flow that goes from Floor 2 to Floor 1, and by creating a flow from the governor through both floors, at which point it is signed into law.
An "education sankey" looks at the legislative paths for identified education bills.
This is to create a comparison between climate legislation and non-climate legislation to make sure patterns we find in one can be found in the other.
"Voiced" sankeys look at the differences between bills that had their votes counted via voiced vote versus not.
Voiced votes are not written down, which makes it impossible to determine who voted for or against a bill.
This idea was shut down after [2017](https://www.seattletimes.com/nation-world/virginia-house-ends-secrecy-in-committee-votes/), so the graphs will be available only for before then.
There is also a line graph present in each year that shows the proportion of bills that make it through each step of the process, just so there is a general idea of what is going on each year.
For this project, we have collaborated with the nonprofit organization Sierra Club.
It provided us with their opinion on various bills and whether they were deemed pro-climate or not.
Unfortunately, due to technical circumstances, the Virginia chapter did not have the opinions on file for 2015 and 2016, so we substituted using the priorities set up by the Metropolitan Washington Council of Local Governments.
Education bills were gathered using a list of key terms and their progressiveness determined using a list of priorities from the Virginia Education Association.
# 2015 {data-orientation=rows}
```{r 2015 Setup}
shell15 <- sierra_data_shell(csv15)
labs <- c("Introduced", "Passed Committee 1", "Passed Floor 1",
"Passed Committee 2", "Passed Floor 2",
"Delivered to Governor", "Signed by Governor", "Law", "Dead")
dead15 <- sierra_data_dead(csv15)
labs_dead <- c("Introduced", "Passed Committee 1", "Passed Floor 1",
"Passed Committee 2", "Passed Floor 2",
"Delivered to Governor", "Signed by Governor", "Law", "Dead")
```
Row {.tabset data-height=550}
----------------------------------
### Graph
```{r 2015 Joint Graph}
plot_ly(
type = "sankey",
arrangement = "snap",
node = list(
label = labels_15,
customdata = node_names(labels_15),
x = c(0, 0.15, 0.15, 0.15, 0.15, 0.25, 0.4, 0.4, 0.4, 0.4, 0.5, 0.65, 0.8, 1),
y = c(0, -0.2, 0.18, 0.22, 0.6, 0.5, 0.32, 0.38, 0.42, 0.52, 0.5, 0.53, 0.5, 0.5),
color = "gray",
hovertemplate = node_hover,
thickness = 10,
pad = 10), # 10 Pixel
link = list(
source = as.numeric(com_15$x) - 1,
target = as.numeric(com_15$next_x),
customdata = flow_names(com_15),
value = com_15$n,
color = ~as.factor(com_15$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
))%>%
layout(title = "Sierra by Committee in 2015",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
```
### Return Sankey
```{r}
plot_ly(
type = "sankey",
arrangement = "snap",
node = list(
label = labs,
customdata = node_names(labs),
x = c(0.0, 0.23, 0.35, 0.5, 0.6, 0.75, 0.9),
y = c(0.5, 0.5, 0.5, 0.29, 0.4, 0.5, 0.3),
color = "gray",
hovertemplate = node_hover,
pad = 10), # 10 Pixel
link = list(
source = as.numeric(shell15$x) - 1,
target = as.numeric(shell15$next_x) - 1,
customdata = flow_names(shell15),
value = shell15$n,
color = ~as.factor(shell15$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
))%>%
layout(title = "Sankey Diagram with Returned Bills 2015",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
```
### Dead Sankey
```{r}
plot_ly(
type = "sankey",
arrangement = "snap",
node = list(
label = labs_dead,
customdata = node_names(labs_dead),
x = c(0.0, 0.23, 0.3, 0.5, 0.6, 0.75, 0.9, 1, 1),
y = c(0.3, 0.53, 0.22, 0.08, 0.06, 0.18, 0.02, -0.2, 0.7),
color = "gray",
hovertemplate = node_hover,
pad = 10), # 10 Pixel
link = list(
source = as.numeric(dead15$x) - 1,
target = as.numeric(dead15$next_x) - 1,
customdata = flow_names(dead15),
value = dead15$n,
color = ~as.factor(dead15$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
))%>%
layout(title = "Sankey Diagram with Dead Bills 2015",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
```
### Education Sankey
```{r}
labels_15 <- c("Introduced", levels(vv_15$x)[2:4], "Other Committee", "Passed Floor 1", "Passed Committee 2", "Passed Floor 2", "Delivered to Governor", "Signed by Governor", "Law")
plot_ly(
type = "sankey",
arrangement = "snap",
node = list(
label = labels_ed_15,
customdata = node_names(labels_ed_15),
x = c(0, 0.15, 0.15, 0.15, 0.15, 0.25, 0.4, 0.4, 0.4, 0.4, 0.5, 0.65, 0.8, 1),
y = c(0, -0.2, 0.18, 0.22, 0.6, 0.5, 0.32, 0.38, 0.42, 0.52, 0.5, 0.53, 0.5, 0.5),
color = "gray",
hovertemplate = node_hover,
thickness = 10,
pad = 10),
link = list(
source = as.numeric(vv_15$x) - 1,
target = as.numeric(vv_15$next_x),
customdata = flow_names(vv_15),
value = vv_15$n,
color = ~as.factor(vv_15$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
)) %>%
layout(title = "Control Sankey for 2015",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
```
### Voiced Sankey
```{r}
voiced15 <- data_creator_vv(null15)
labels_15 <- c("Introduced", levels(voiced15$x)[2:4], "Other Committee", "Passed Floor 1", "Passed Committee 2", "Passed Floor 2", "Delivered to Governor", "Signed by Governor", "Law")
plot_ly(
type = "sankey",
arrangement = "snap",
node = list(
label = labels_ed_15,
customdata = node_names(labels_ed_15),
x = c(0, 0.15, 0.15, 0.15, 0.15, 0.25, 0.4, 0.4, 0.4, 0.4, 0.5, 0.65, 0.8, 1),
y = c(0, -0.2, 0.18, 0.22, 0.6, 0.5, 0.32, 0.38, 0.42, 0.52, 0.5, 0.53, 0.5, 0.5),
color = "gray",
hovertemplate = node_hover,
thickness = 10,
pad = 10),
link = list(
source = as.numeric(voiced15$x) - 1,
target = as.numeric(voiced15$next_x),
customdata = flow_names(voiced15),
value = voiced15$n,
color = ~as.factor(voiced15$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
)) %>%
layout(title = "Voiced Votes for Education in 2015",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
```
### Line Graph
```{r}
line_graph(csv15, 2015)
```
Row
---------------------------------
### Table {data-width=600}
```{r}
rtable(csv15)
```
### Description
Governor: Terry McAuliffe - Senate Composition: 21R:19D - House Composition: 67R:33D
The layout for each year will look something like this, with the ability to change the graph the user is looking at near the top, a table on the left to show the climate bill counts for each individual committee, and a panel containing a qualitative description of that year in addition to general state government breakdown by party.
2017 and onward will have a breakdown by opinion on whether the bill is pro or against climate.
2015 has a pattern that will be repeated for future years in having a disproportionate amount of bills die in the initial committee, with a few more dying in the second committee and few dying anywhere else.
Only 43\% of bills made it out of that stage of interest, which will still get alarmingly smaller in the coming years.
Another fact to establish is the disproportionate influence the House Commerce \& Labor committee has in the amount of bills that they receive, with its Senate counterpart and the House Agriculture, Chesapeke \& Natural Resources and Senate Agriculture, Conservation \& Natural Resources committees also being major players.
The control sankey follows a similar pattern to the climate bills, albeit more scrutinous on account of the lack of any unanimous bills to "pad out" the flows later on in the legislative process.
This is the first year that joint resolutions are introduced, which involve passing both chambers but not needing the president's approval.
As a result they are different from a "law," though it will still be treated as such for the sake of visualization.
A joint resolution will be shown as going through the chambers and will "become a law," skipping the governor entirely.
# 2016 {data-orientation=rows}
```{r 2016 Setup}
shell16 <- sierra_data_shell(csv16)
labs <- c("Introduced", "Passed Committee 1", "Passed Floor 1",
"Passed Committee 2", "Passed Floor 2",
"Delivered to Governor", "Signed by Governor", "Law", "Dead")
dead16 <- sierra_data_dead(csv16)
labs_dead <- c("Introduced", "Passed Committee 1", "Passed Floor 1",
"Passed Committee 2", "Passed Floor 2",
"Delivered to Governor", "Signed by Governor", "Law", "Dead")
```
Row {.tabset data-height=550}
----------------------------------
### Graph
```{r}
plot_ly(
type = "sankey",
arrangement = "snap",
node = list(
label = labels_16,
customdata = node_names(labels_16),
x = c(0, 0.15, 0.15, 0.15, 0.15, 0.25, 0.4, 0.4, 0.4, 0.4, 0.5, 0.65, 0.8, 1),
y = c(0, -0.2, 0.18, 0.22, 0.6, 0.5, 0.32, 0.38, 0.42, 0.52, 0.5, 0.53, 0.5, 0.5),
color = "gray",
hovertemplate = node_hover,
thickness = 10,
pad = 10), # 10 Pixel
link = list(
source = as.numeric(com_16$x) - 1,
target = as.numeric(com_16$next_x),
customdata = flow_names(com_16),
value = com_16$n,
color = ~as.factor(com_16$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
))%>%
layout(title = "Sierra by Committee in 2016",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
```
### Return Sankey
```{r}
plot_ly(
type = "sankey",
arrangement = "snap",
node = list(
label = labs,
customdata = node_names(labs),
x = c(0.0, 0.23, 0.35, 0.5, 0.6, 0.75, 0.9),
y = c(0.5, 0.5, 0.5, 0.29, 0.4, 0.5, 0.3),
color = "gray",
hovertemplate = node_hover,
pad = 10), # 10 Pixel
link = list(
source = as.numeric(shell16$x) - 1,
target = as.numeric(shell16$next_x) - 1,
customdata = flow_names(shell16),
value = shell16$n,
color = ~as.factor(shell16$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
))%>%
layout(title = "Sankey Diagram with Returned Bills 2016",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
```
### Dead Sankey
```{r}
plot_ly(
type = "sankey",
arrangement = "snap",
node = list(
label = labs_dead,
customdata = node_names(labs_dead),
x = c(0.0, 0.23, 0.3, 0.5, 0.6, 0.75, 0.9, 1, 1),
y = c(0.3, 0.52, 0.1, 0.19, 0.06, 0.04, 0.02, -0.2, 0.7),
color = "gray",
hovertemplate = node_hover,
pad = 10), # 10 Pixel
link = list(
source = as.numeric(dead16$x) - 1,
target = as.numeric(dead16$next_x) - 1,
customdata = flow_names(dead16),
value = dead16$n,
color = ~as.factor(dead16$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
))%>%
layout(title = "Sankey Diagram with Dead Bills 2016",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
```
### Education Sankey
```{r}
labels_16 <- c("Introduced", levels(vv_16$x)[2:4], "Other Committee", "Passed Floor 1", "Passed Committee 2", "Passed Floor 2", "Delivered to Governor", "Signed by Governor", "Law")
plot_ly(
type = "sankey",
arrangement = "snap",
node = list(
label = labels_ed_16,
customdata = node_names(labels_ed_16),
x = c(0, 0.15, 0.15, 0.15, 0.15, 0.25, 0.4, 0.4, 0.4, 0.4, 0.5, 0.65, 0.8, 1),
y = c(0, -0.2, 0.18, 0.22, 0.6, 0.5, 0.32, 0.38, 0.42, 0.52, 0.5, 0.53, 0.5, 0.5),
color = "gray",
hovertemplate = node_hover,
thickness = 10,
pad = 10),
link = list(
source = as.numeric(vv_16$x) - 1,
target = as.numeric(vv_16$next_x),
customdata = flow_names(vv_16),
value = vv_16$n,
color = ~as.factor(vv_16$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
)) %>%
layout(title = "Control Sankey for 2016",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
```
### Voiced Sankey
```{r}
voiced16 <- data_creator_vv(null16)
labels_16 <- c("Introduced", levels(voiced16$x)[2:4], "Other Committee", "Passed Floor 1", "Passed Committee 2", "Passed Floor 2", "Delivered to Governor", "Signed by Governor", "Law")
plot_ly(
type = "sankey",
arrangement = "snap",
node = list(
label = labels_ed_16,
customdata = node_names(labels_ed_16),
x = c(0, 0.15, 0.15, 0.15, 0.15, 0.25, 0.4, 0.4, 0.4, 0.4, 0.5, 0.65, 0.8, 1),
y = c(0, -0.2, 0.18, 0.22, 0.6, 0.5, 0.32, 0.38, 0.42, 0.52, 0.5, 0.53, 0.5, 0.5),
color = "gray",
hovertemplate = node_hover,
thickness = 10,
pad = 10),
link = list(
source = as.numeric(voiced16$x) - 1,
target = as.numeric(voiced16$next_x),
customdata = flow_names(voiced16),
value = voiced16$n,
color = ~as.factor(voiced16$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
)) %>%
layout(title = "Voiced Votes for Education in 2016",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
```
### Line Graph
```{r}
line_graph(csv16, 2016)
```
Row
---------------------------------
### Table {data-width=600}
```{r}
rtable(csv16)
```
### Description
Governor: Terry McAuliffe - Senate Composition: 21R:19D - House Composition: 66R:34D
2016 had a different congressional makeup on account of 2015 midterm elections, with democrats gaining a seat in the House but had Republicans retain a supermajority.
This year has a similar pattern to the previous year, with most of the bills dying off in the first committee and only 42\% making it through.
Future years will introduce a new aspect to the graphs in showing the amount of bills deemed pro-climate or not, which we will see will make a difference in terms of how likely a bill is to be passed.
Looking at the control Sankey, an interesting pattern emerges.
Though both voiced and recorded votes died in massive rates, bills that held a voiced vote died in disproportionate rates.
2015 had no voiced bills pass.
2016 had 40\% of introduced bills held to a voice vote, while only ~13\% of bills that were passed into law were voiced.
This suggests the correlation that voiced bills are less likely to be passed into law, even less than non-unanimous in general are.
# 2017 {data-orientation=rows}
```{r 2017 Setup}
shell17 <- sierra_data_shell(csv17)
labs <- c("Introduced", "Passed Committee 1", "Passed Floor 1",
"Passed Committee 2", "Passed Floor 2",
"Delivered to Governor", "Signed by Governor", "Law", "Dead")
dead17 <- sierra_data_dead(csv17)
labs_dead <- c("Introduced", "Passed Committee 1", "Passed Floor 1",
"Passed Committee 2", "Passed Floor 2",
"Delivered to Governor", "Signed by Governor", "Law", "Dead")
```
Row {.tabset data-height=550}
----------------------------------
### Graph
```{r}
plot_ly(
type = "sankey",
arrangement = "snap",
node = list(
label = labels_17,
customdata = node_names(labels_17),
x = c(0, 0.15, 0.15, 0.15, 0.15, 0.25, 0.4, 0.4, 0.4, 0.4, 0.5, 0.65, 0.8, 1),
y = c(0, -0.2, 0.18, 0.22, 0.6, 0.5, 0.32, 0.38, 0.42, 0.52, 0.5, 0.53, 0.5, 0.5),
color = "gray",
hovertemplate = node_hover,
thickness = 10,
pad = 10), # 10 Pixel
link = list(
source = as.numeric(com_17$x) - 1,
target = as.numeric(com_17$next_x),
customdata = flow_names(com_17),
value = com_17$n,
color = ~as.factor(com_17$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
))%>%
layout(title = "Sierra by Committee in 2017",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
```
### Return Sankey
```{r}
plot_ly(
type = "sankey",
arrangement = "snap",
node = list(
label = labs,
customdata = node_names(labs),
x = c(0, 0.23, 0.35, 0.5, 0.6, 0.75, 0.9),
y = c(0.5, 0.5, 0.5, 0.29, 0.4, 0.5, 0.3),
color = "gray",
hovertemplate = node_hover,
pad = 10), # 10 Pixel
link = list(
source = as.numeric(shell17$x) - 1,
target = as.numeric(shell17$next_x) - 1,
customdata = flow_names(shell17),
value = shell17$n,
color = ~as.factor(shell17$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
))%>%
layout(title = "Sankey Diagram with Returned Bills 2017",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
```
### Dead Sankey
```{r}
plot_ly(
type = "sankey",
arrangement = "snap",
node = list(
label = labs_dead,
customdata = node_names(labs_dead),
x = c(0, 0.23, 0.3, 0.5, 0.6, 0.75, 0.9, 1, 1),
y = c(0.3, 0.52, 0.1, 0.19, 0.06, 0.04, 0.02, -0.2, 0.7),
color = "gray",
hovertemplate = node_hover,
pad = 10), # 10 Pixel
link = list(
source = as.numeric(dead17$x) - 1,
target = as.numeric(dead17$next_x) - 1,
customdata = flow_names(dead17),
value = dead17$n,
color = ~as.factor(dead17$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
))%>%
layout(title = "Sankey Diagram with Dead Bills 2017",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
```
### Education Sankey
```{r}
voiced17 <- data_creator_vv(null17)
labels_17 <- c("Introduced", levels(vv_17$x)[2:4], "Other Committee", "Passed Floor 1", "Passed Committee 2", "Passed Floor 2", "Delivered to Governor", "Signed by Governor", "Law")
plot_ly(
type = "sankey",
arrangement = "snap",
node = list(
label = labels_ed_17,
customdata = node_names(labels_ed_17),
x = c(0, 0.15, 0.15, 0.15, 0.15, 0.25, 0.4, 0.4, 0.4, 0.4, 0.5, 0.65, 0.8, 1),
y = c(0, -0.2, 0.18, 0.22, 0.6, 0.5, 0.32, 0.38, 0.42, 0.52, 0.5, 0.53, 0.5, 0.5),
color = "gray",
hovertemplate = node_hover,
thickness = 10,
pad = 10),
link = list(
source = as.numeric(vv_17$x) - 1,
target = as.numeric(vv_17$next_x),
customdata = flow_names(vv_17),
value = vv_17$n,
color = ~as.factor(vv_17$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
)) %>%
layout(title = "Control Sankey for 2017",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
```
### Line Graph
```{r}
line_graph(csv17)
```
Row
---------------------------------
### Table {data-width=600}
```{r}
rtable(csv17)
```
### Description
Governor: Terry McAuliffe - Senate Composition: 21R:19D - House Composition: 66R:34D
2017 gives us an insight into just how many pro-climate bills end up dying in the committees compared to other climate bills.
This is especially apparent when looking at the proportional line graph, with neutral and negative bills all being more likely (over 50\%) to make it out of that initial committee compared to pro-climate legislation (27\%).
The control diagram offers a similar story, with many more voice vote bills dying compared to recorded.
This pattern will continue for the most part, with many bills dying within the committee, with pro-climate and voice-vote bills being predominantly targetted.
One unique characteristic to this year is it has a the smallest proportion of positive bills out of all the years studied.
Only 55% of the bills were supported by Sierra Club.
This is contrary to future sessions where 70+% of bills are supported by Sierra Club.
# 2018 {data-orientation=rows}
Row {.tabset data-height=550}
---------------------------------
### Graph
```{r}
plot_ly(
type = "sankey",
arrangement = "snap",
node = list(
label = labels_18,
customdata = node_names(labels_18),
x = c(0, 0.15, 0.15, 0.15, 0.15, 0.25, 0.4, 0.4, 0.4, 0.4, 0.5, 0.65, 0.8, 1),
y = c(0, -0.2, 0.18, 0.22, 0.6, 0.5, 0.32, 0.38, 0.42, 0.52, 0.5, 0.53, 0.5, 0.5),
color = "gray",
hovertemplate = node_hover,
thickness = 10,
pad = 10), # 10 Pixel
link = list(
source = as.numeric(com_18$x) - 1,
target = as.numeric(com_18$next_x),
customdata = flow_names(com_18),
value = com_18$n,
color = ~as.factor(com_18$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
))%>%
layout(title = "Sierra by Committee in 2018",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
```
### Return Sankey
```{r}
shell18 <- sierra_data_shell(csv18)
labs <- c("Introduced", "Passed Committee 1", "Passed Floor 1",
"Passed Committee 2", "Passed Floor 2",
"Delivered to Governor", "Signed by Governor", "Law", "Dead")
plot_ly(
type = "sankey",
arrangement = "snap",
node = list(
label = labs,
customdata = node_names(labs),
x = c(0, 0.23, 0.35, 0.5, 0.6, 0.75, 0.9),
y = c(0.5, 0.5, 0.5, 0.29, 0.4, 0.5, 0.3),
color = "gray",
hovertemplate = node_hover,
pad = 10), # 10 Pixel
link = list(
source = as.numeric(shell18$x) - 1,
target = as.numeric(shell18$next_x) - 1,
customdata = flow_names(shell18),
value = shell18$n,
color = ~as.factor(shell18$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
))%>%
layout(title = "Sankey Diagram with Returned Bills 2018",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
```
### Dead Sankey
```{r 2018 Dead Sankey}
dead18 <- sierra_data_dead(csv18)
labs <- c("Introduced", "Passed Committee 1", "Passed Floor 1",
"Passed Committee 2", "Passed Floor 2",
"Delivered to Governor", "Signed by Governor", "Law", "Dead")
plot_ly(
type = "sankey",
arrangement = "snap",
node = list(
label = labs,
customdata = node_names(labs),
x = c(0, 0.23, 0.3, 0.4, 0.6, 0.75, 0.9, 1, 1),
y = c(0.3, 0.61, 0.15, 0.12, 0.09, 0.15, 0.02, -0.2, 0.7),
color = "gray",
hovertemplate = node_hover,
pad = 10), # 10 Pixel
link = list(
source = as.numeric(dead18$x) - 1,
target = as.numeric(dead18$next_x) - 1,
customdata = flow_names(dead18),
value = dead18$n,
color = ~as.factor(dead18$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
))%>%
layout(title = "Sankey Diagram with Dead Bills 2018",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
```
### Education Sankey
```{r}
labels_18 <- c("Introduced", levels(vv_18$x)[2:4], "Other Committee", "Passed Floor 1", "Passed Committee 2", "Passed Floor 2", "Delivered to Governor", "Signed by Governor", "Law")
plot_ly(
type = "sankey",
arrangement = "snap",
node = list(
label = labels_ed_18,
customdata = node_names(labels_ed_18),
x = c(0, 0.15, 0.15, 0.15, 0.15, 0.25, 0.4, 0.4, 0.4, 0.4, 0.5, 0.65, 0.8, 1),
y = c(0, -0.2, 0.18, 0.22, 0.6, 0.5, 0.32, 0.38, 0.42, 0.52, 0.5, 0.53, 0.5, 0.5),
color = "gray",
hovertemplate = node_hover,
thickness = 10,
pad = 10),
link = list(
source = as.numeric(vv_18$x) - 1,
target = as.numeric(vv_18$next_x),
customdata = flow_names(vv_18),
value = vv_18$n,
color = ~as.factor(vv_18$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
)) %>%
layout(title = "Control Sankey for 2018",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
```
### Line Graph
```{r 2018 Line Graph}
line_graph(csv18, 2018)
```
Row
---------------------------------
### Table {data-width=600}
```{r 2018 Table}
rtable(csv18)
```
### Description
Governor: Ralph Northam - Senate Composition: 21R:19D - House Composition: 51R:49D
This year is more drastic than 2017.
Control over congress and governorship has not changed, but there was a bit of reshuffling done through house elections, losing republicans their supermajority from the previous year.
In addition, there was the election of Governor Northam, who presided over all future legislature we are currently analyzing.
A higher proportion of bills ended up dying in their initial committees, with barely any dying afterwards.
The difference in procedure between the initial committee hearings and debate held elsewhere is that committee hearings are public.
This means it is impossible, through public means, to determine what exactly occured that caused the bill to die.
The votes are secret, as well as the conversation that occurs between congresspeople.
# 2019 {data-orientation=rows}
Row {.tabset data-height=550}
---------------------------------
### Graph
```{r 2019 Joint Resolutions}
plot_ly(
type = "sankey",
arrangement = "snap",
node = list(
label = labels_19,
customdata = node_names(labels_19),
x = c(0, 0.15, 0.15, 0.15, 0.15, 0.25, 0.4, 0.4, 0.4, 0.4, 0.5, 0.65, 0.8, 1),
y = c(0, -0.2, 0.18, 0.22, 0.6, 0.5, 0.32, 0.38, 0.42, 0.52, 0.5, 0.53, 0.5, 0.5),
color = "gray",
hovertemplate = node_hover,
thickness = 10,
pad = 10), # 10 Pixel
link = list(
source = as.numeric(com_19$x) - 1,
target = as.numeric(com_19$next_x),
customdata = flow_names(com_19),
value = com_19$n,
color = ~as.factor(com_19$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
))%>%
layout(title = "Sierra by Committee in 2019",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
```
### Return Sankey
```{r 2019 Shell}
shell19 <- sierra_data_shell(csv19)
labs <- c("Introduced", "Passed Committee 1", "Passed Floor 1",
"Passed Committee 2", "Passed Floor 2",
"Delivered to Governor", "Signed by Governor", "Law", "Dead")
plot_ly(
type = "sankey",
arrangement = "snap",
node = list(
label = labs,
customdata = node_names(labs),
x = c(0, 0.23, 0.35, 0.5, 0.6, 0.75, 0.9),
y = c(0.5, 0.5, 0.5, 0.29, 0.4, 0.5, 0.3),
color = "gray",
hovertemplate = node_hover,
pad = 10), # 10 Pixel
link = list(
source = as.numeric(shell19$x) - 1,
target = as.numeric(shell19$next_x) - 1,
customdata = flow_names(shell19),
value = shell19$n,
color = ~as.factor(shell19$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
))%>%
layout(title = "Sankey Diagram with Returned Bills 2019",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
```
### Dead Sankey
```{r 2019 Dead}
dead19 <- sierra_data_dead(csv19)
labs <- c("Introduced", "Passed Committee 1", "Passed Floor 1",
"Passed Committee 2", "Passed Floor 2",
"Delivered to Governor", "Signed by Governor", "Law", "Dead")
plot_ly(
type = "sankey",
arrangement = "snap",
node = list(
label = labs,
customdata = node_names(labs),
x = c(0, 0.23, 0.3, 0.5, 0.6, 0.75, 0.9, 1, 1),
y = c(0.3, 0.62, 0.28, 0.25, 0.23, 0.21, -0.05, -0.2, 0.7),
color = "gray",
hovertemplate = node_hover,
pad = 10), # 10 Pixel
link = list(
source = as.numeric(dead19$x) - 1,
target = as.numeric(dead19$next_x) - 1,
customdata = flow_names(dead19),
value = dead19$n,
color = ~as.factor(dead19$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
))%>%
layout(title = "Sankey Diagram with Dead Bills 2019",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
```
### Education Sankey
```{r}
labels_19 <- c("Introduced", levels(vv_19$x)[2:4], "Other Committee", "Passed Floor 1", "Passed Committee 2", "Passed Floor 2", "Delivered to Governor", "Signed by Governor", "Law")
plot_ly(
type = "sankey",
arrangement = "snap",
node = list(
label = labels_ed_19,
customdata = node_names(labels_ed_19),
x = c(0, 0.15, 0.15, 0.15, 0.15, 0.25, 0.4, 0.4, 0.4, 0.4, 0.5, 0.65, 0.8, 1),
y = c(0, -0.2, 0.18, 0.22, 0.6, 0.5, 0.32, 0.38, 0.42, 0.52, 0.5, 0.53, 0.5, 0.5),
color = "gray",
hovertemplate = node_hover,
thickness = 10,
pad = 10),
link = list(
source = as.numeric(vv_19$x) - 1,
target = as.numeric(vv_19$next_x),
customdata = flow_names(vv_19),
value = vv_19$n,
color = ~as.factor(vv_19$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
)) %>%
layout(title = "Control Sankey for 2019",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
```
### Line Graph
```{r 2019 Line Graph}
line_graph(csv19, 2019)
```
Row
---------------------------------
### Table {data-width=600}
```{r 2019 Table}
rtable(csv19)
```
### Description
Governor: Ralph Northam - Senate Composition: 21R:19D - House Composition: 51R:49D
The pattern from previous years is once again replicated in 2019!
Deaths within the committee are numerous, while elsewhere they are not.
Pro-Climate bills are still the most disproportionately affected, though climate-neutral and opposing bills are also affected.
There are a couple of hypothesis that can be presented as to why this pattern has appeared again and again.
The first is that a number of these bills are genuinely problematic and do not need to be considered on the Floor.
The second hypothesis is more dire: the privacy of committee voting is intentionally being used to kill off legislation that officials do not want to go in public as being against.
There are a couple of issues with the first line of thinking.
On a more practical level, that legislation simply would not have been introduced in the first place were it problematic.
On a more imperical level, were this hypothesis true then it would be expected to hold in the instance that there is a shift in party control.
This shift in party ended up occuring in 2020.
# 2020 {data-orientation=rows}
Row {.tabset data-height=550}
---------------------------------
### Graph
```{r 2020 Joint Graph}
plot_ly(
type = "sankey",
arrangement = "snap",
node = list(
label = labels_20,
customdata = node_names(labels_20),
x = c(0, 0.15, 0.15, 0.15, 0.15, 0.25, 0.4, 0.4, 0.4, 0.4, 0.5, 0.65, 0.8, 1),
y = c(0, -0.2, 0.18, 0.22, 0.6, 0.5, 0.32, 0.38, 0.42, 0.52, 0.5, 0.53, 0.5, 0.5),
color = "gray",
hovertemplate = node_hover,
thickness = 10,
pad = 10), # 10 Pixel
link = list(
source = as.numeric(com_20$x) - 1,
target = as.numeric(com_20$next_x),
customdata = flow_names(com_20),
value = com_20$n,
color = ~as.factor(com_20$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
))%>%
layout(title = "Sierra by Committee in 2020",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
```
### Return Sankey
```{r 2020 Shell}
shell20 <- sierra_data_shell(csv20)
labs <- c("Introduced", "Passed Committee 1", "Passed Floor 1",
"Passed Committee 2", "Passed Floor 2",
"Delivered to Governor", "Signed by Governor", "Law", "Dead")
plot_ly(
type = "sankey",
arrangement = "snap",
node = list(
label = labs,
customdata = node_names(labs),
x = c(0, 0.23, 0.35, 0.5, 0.6, 0.75, 0.9),
y = c(0.5, 0.5, 0.5, 0.29, 0.4, 0.5, 0.3),
color = "gray",
hovertemplate = node_hover,
pad = 10), # 10 Pixel
link = list(
source = as.numeric(shell20$x) - 1,
target = as.numeric(shell20$next_x) - 1,
customdata = flow_names(shell20),
value = shell20$n,
color = ~as.factor(shell20$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
))%>%
layout(title = "Sankey Diagram with Returned Bills 2020",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
```
### Dead Sankey
```{r 2020 Dead}
dead20 <- sierra_data_dead(csv20)
labs <- c("Introduced", "Passed Committee 1", "Passed Floor 1",
"Passed Committee 2", "Passed Floor 2",
"Delivered to Governor", "Signed by Governor", "Law", "Dead")
plot_ly(
type = "sankey",
arrangement = "snap",
node = list(
label = labs,
customdata = node_names(labs),
x = c(0, 0.23, 0.35, 0.5, 0.6, 0.75, 0.9, 1, 1),
y = c(0.3, 0.62, 0.28, 0.25, 0.23, 0.27, -0.05, -0.2, 0.7),
color = "gray",
hovertemplate = node_hover,
pad = 10), # 10 Pixel
link = list(
source = as.numeric(dead20$x) - 1,
target = as.numeric(dead20$next_x) - 1,
customdata = flow_names(dead20),
value = dead20$n,
color = ~as.factor(dead20$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
))%>%
layout(title = "Sankey Diagram with Dead Bills 2020",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
```
### Education Sankey
```{r}
labels_20 <- c("Introduced", levels(vv_20$x)[2:4], "Other Committee", "Passed Floor 1", "Passed Committee 2", "Passed Floor 2", "Delivered to Governor", "Signed by Governor", "Law")
plot_ly(
type = "sankey",
arrangement = "snap",
node = list(
label = labels_ed_20,
customdata = node_names(labels_ed_20),
x = c(0, 0.15, 0.15, 0.15, 0.15, 0.25, 0.4, 0.4, 0.4, 0.4, 0.5, 0.65, 0.8, 1),
y = c(0, -0.2, 0.18, 0.22, 0.6, 0.5, 0.32, 0.38, 0.42, 0.52, 0.5, 0.53, 0.5, 0.5),
color = "gray",
hovertemplate = node_hover,
thickness = 10,
pad = 10),
link = list(
source = as.numeric(vv_20$x) - 1,
target = as.numeric(vv_20$next_x),
customdata = flow_names(vv_20),
value = vv_20$n,
color = ~as.factor(vv_20$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
)) %>%
layout(title = "Control Sankey for 2020",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
```
### Line Graph
```{r 2020 Line Graph}
line_graph(csv20, 2020)
```
Row
---------------------------------
### Table {data-width=600}
```{r 2020 Table}
rtable(csv20)
```
### Description
Governor: Ralph Northam - Senate Composition: 21D:19R - House Composition: 55D:45R
2019 elections had democrats sweeping Virginian State Congress on account of anti-Trump rhetoric, giving democrats trifecta control for the first time in 20 years.
This appears to have lead to sizably more pro-climate bills making it through the first committee.
There were still proportionally the same amount of pro-climate bills being introduced compared to other years (with the exception of 2017) at ~80% positive.
This demonstrates a strong correlation between control of the legislative bodies and whether those bodies choose to take advantage of the opaqueness of the committees to have bills thrown out in the initial committee overview.
That aside, a lot of the bills still end up dying within that unaccountable committee.
We have no public way of knowing the specific reason for why that is the case.
We can only see that bills have been passing in a less discriminatory manner and make inferences from that.
One inference that we cannot make is that the bills are simply just problematic and not worth considering on the floor.
If that were the case, the bills this year would have been targetted much more in the committee level.
As a result, a more likely inference is that the legislative structure is being taken advantage of to varying degrees depending on the party control.
In addition, there was a lot more action with various bills (amendments/recommendations, close votes, etc.) that cannot be shown within the restraints of the current graphic and will be shown in more detail in the "Other graphic forms" tab.
# 2021 {data-orientation=rows}
Row {.tabset data-height=550}
---------------------------------
### Graph
```{r 2021 Joint}
plot_ly(
type = "sankey",
arrangement = "snap",
node = list(
label = labels_21,
customdata = node_names(labels_21),
x = c(0, 0.15, 0.15, 0.15, 0.15, 0.25, 0.4, 0.4, 0.4, 0.4, 0.5, 0.65, 0.8, 1),
y = c(0, -0.2, 0.18, 0.22, 0.6, 0.5, 0.32, 0.38, 0.42, 0.52, 0.5, 0.53, 0.5, 0.5),
color = "gray",
hovertemplate = node_hover,
thickness = 10,
pad = 10), # 10 Pixel
link = list(
source = as.numeric(com_21$x) - 1,
target = as.numeric(com_21$next_x),
customdata = flow_names(com_21),
value = com_21$n,
color = ~as.factor(com_21$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
))%>%
layout(title = "Sierra by Committee in 2021",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
```
### Return Sankey
```{r 2021 Shell}
shell21 <- sierra_data_shell(csv21)
labs <- c("Introduced", "Passed Committee 1", "Passed Floor 1",
"Passed Committee 2", "Passed Floor 2",
"Delivered to Governor", "Signed by Governor", "Law", "Dead")
plot_ly(
type = "sankey",
arrangement = "snap",
node = list(
label = labs,
customdata = node_names(labs),
x = c(0, 0.23, 0.35, 0.5, 0.6, 0.75, 0.9),
y = c(0.5, 0.5, 0.5, 0.29, 0.4, 0.5, 0.3),
color = "gray",
hovertemplate = node_hover,
pad = 10), # 10 Pixel
link = list(
source = as.numeric(shell21$x) - 1,
target = as.numeric(shell21$next_x) - 1,
customdata = flow_names(shell21),
value = shell21$n,
color = ~as.factor(shell21$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
))%>%
layout(title = "Sankey Diagram with Returned Bills 2021",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
```
### Dead Sankey
```{r 2021 Dead}
dead21 <- sierra_data_dead(csv21)
labs <- c("Introduced", "Passed Committee 1", "Passed Floor 1",
"Passed Committee 2", "Passed Floor 2",
"Delivered to Governor", "Signed by Governor", "Law", "Dead")
plot_ly(
type = "sankey",
arrangement = "snap",
node = list(
label = labs,
customdata = node_names(labs),
x = c(0, 0.23, 0.35, 0.45, 0.6, 0.75, 0.9, 1, 1),
y = c(0.3, 0.62, 0.42, 0.36, 0.23, 0.35, -0.05, -0.2, 0.7),
color = "gray",
hovertemplate = node_hover,
pad = 10), # 10 Pixel
link = list(
source = as.numeric(dead21$x) - 1,
target = as.numeric(dead21$next_x) - 1,
customdata = flow_names(dead21),
value = dead21$n,
color = ~as.factor(dead21$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
))%>%
layout(title = "Sankey Diagram with Dead Bills 2021",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
```
### Education Sankey
```{r}
labels_21 <- c("Introduced", levels(vv_21$x)[2:4], "Other Committee", "Passed Floor 1", "Passed Committee 2", "Passed Floor 2", "Delivered to Governor", "Signed by Governor", "Law")
plot_ly(
type = "sankey",
arrangement = "snap",
node = list(
label = labels_ed_21,
customdata = node_names(labels_ed_21),
x = c(0, 0.15, 0.15, 0.15, 0.15, 0.25, 0.4, 0.4, 0.4, 0.4, 0.5, 0.65, 0.8, 1),
y = c(0, -0.2, 0.18, 0.22, 0.6, 0.5, 0.32, 0.38, 0.42, 0.52, 0.5, 0.53, 0.5, 0.5),
color = "gray",
hovertemplate = node_hover,
thickness = 10,
pad = 10),
link = list(
source = as.numeric(vv_21$x) - 1,
target = as.numeric(vv_21$next_x),
customdata = flow_names(vv_21),
value = vv_21$n,
color = ~as.factor(vv_21$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
)) %>%
layout(title = "Control Sankey for 2021",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
```
### Line Graph
```{r}
line_graph(csv21, 2021)
```
Row
---------------------------------
### Table {data-width=600}
```{r}
rtable(csv21)
```
### Description
Governor: Ralph Northam - Senate Composition: 21D:19R - House Composition: 55D:45R
This year was exceptional for Sierra Club-supported legislation.
Not only were ~90% of the bills supported by the organization, but an unprecedented amount of bills ended up passing the initial hurdle of the first committee.
In addition, there are a sizable amount of joint resolutions this year, which as stated are not laws but still abide by a legislative process and are included as such.
That congratulatory news aside, it is even in this favored environment still has most dead bills die in the committee.
There are no public voting records, not much in general to go off why they were rejected.
This becomes problematic within a democratic society where an active citizen would want to know which congresspeople voted for what and what their specific opinion on a bill was.
Sure, the amount killed off this year has been smaller, but we still do not know the reason why or much of anything.
An interesting note to be made is that the control sankey diagram does not have any bills that get past the second committee.
This is strange for a couple of reasons:
1. There was a democratic trifecta present, which would have increased the amount of passed bills, and
2. 2020 had a democratic trifecta as well and the control sankey there reflected the climate legislation passed that year, with more control bills passing through.
There was an issue with random bill generation for this particular year that resulted in non-passed bills being more influential than usual, so take this year's control sankey with caution.
# 2022 {data-orientation=rows}
Row {.tabset data-height=550}
---------------------------------
### Graph
```{r 2022 Joint}
plot_ly(
type = "sankey",
arrangement = "snap",
node = list(
label = labels_22,
customdata = node_names(labels_22),
x = c(0, 0.15, 0.15, 0.15, 0.15, 0.25, 0.4, 0.4, 0.4, 0.4, 0.5, 0.65, 0.8, 1),
y = c(0, -0.2, 0.18, 0.22, 0.6, 0.5, 0.32, 0.38, 0.42, 0.52, 0.5, 0.53, 0.5, 0.5),
color = "gray",
hovertemplate = node_hover,
thickness = 10,
pad = 10), # 10 Pixel
link = list(
source = as.numeric(com_22$x) - 1,
target = as.numeric(com_22$next_x),
customdata = flow_names(com_22),
value = com_22$n,
color = ~as.factor(com_22$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
))%>%
layout(title = "Sierra by Committee in 2022",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
```
### Return Sankey
```{r 2022 Shell}
shell22 <- sierra_data_shell(csv22)
labs <- c("Introduced", "Passed Committee 1", "Passed Floor 1",
"Passed Committee 2", "Passed Floor 2",
"Delivered to Governor", "Signed by Governor", "Law", "Dead")
plot_ly(
type = "sankey",
arrangement = "snap",
node = list(
label = labs,
customdata = node_names(labs),
x = c(0, 0.23, 0.35, 0.5, 0.6, 0.75, 0.9),
y = c(0.5, 0.5, 0.5, 0.29, 0.4, 0.5, 0.3),
color = "gray",
hovertemplate = node_hover,
pad = 10), # 10 Pixel
link = list(
source = as.numeric(shell22$x) - 1,
target = as.numeric(shell22$next_x) - 1,
customdata = flow_names(shell22),
value = shell22$n,
color = ~as.factor(shell22$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
))%>%
layout(title = "Sankey Diagram with Returned Bills 2022",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
```
### Dead Sankey
```{r 2022 Dead}
dead22 <- sierra_data_dead(csv22)
labs <- c("Introduced", "Passed Committee 1", "Passed Floor 1",
"Passed Committee 2", "Passed Floor 2",
"Delivered to Governor", "Signed by Governor", "Law", "Dead")
plot_ly(
type = "sankey",
arrangement = "snap",
node = list(
label = labs,
customdata = node_names(labs),
x = c(0, 0.23, 0.35, 0.45, 0.6, 0.75, 0.9, 1, 1),
y = c(0.3, 0.62, 0.42, 0.36, 0.23, 0.35, -0.05, -0.2, 0.7),
color = "gray",
hovertemplate = node_hover,
pad = 10), # 10 Pixel
link = list(
source = as.numeric(dead22$x) - 1,
target = as.numeric(dead22$next_x) - 1,
customdata = flow_names(dead22),
value = dead22$n,
color = ~as.factor(dead22$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
))%>%
layout(title = "Sankey Diagram with Dead Bills 2022",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
```
### Education Sankey
```{r}
labels_22 <- c("Introduced", levels(vv_22$x)[2:4], "Other Committee", "Passed Floor 1", "Passed Committee 2", "Passed Floor 2", "Delivered to Governor", "Signed by Governor", "Law")
plot_ly(
type = "sankey",
arrangement = "snap",
node = list(
label = labels_ed_22,
customdata = node_names(labels_ed_22),
x = c(0, 0.15, 0.15, 0.15, 0.15, 0.25, 0.4, 0.4, 0.4, 0.4, 0.5, 0.65, 0.8, 1),
y = c(0, -0.2, 0.18, 0.22, 0.6, 0.5, 0.32, 0.38, 0.42, 0.52, 0.5, 0.53, 0.5, 0.5),
color = "gray",
hovertemplate = node_hover,
thickness = 10,
pad = 10),
link = list(
source = as.numeric(vv_22$x) - 1,
target = as.numeric(vv_22$next_x),
customdata = flow_names(vv_22),
value = vv_22$n,
color = ~as.factor(vv_22$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
)) %>%
layout(title = "Control Sankey for 2022",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
```
### Line Graph
```{r}
line_graph(csv22, 2022)
```
Row
---------------------------------
### Table {data-width=600}
```{r}
rtable(csv22)
```
### Description
Governor: Glenn Youngkin - Senate Composition: 21D:18R - House Composition: 48D:52R
This year is the first year in almost a decade when a Republican governor took office in Virginia.
Aside from that, bill-passing levels have regressed back to pre-2020 levels.
# 2023 {data-orientation=rows}
Row {.tabset data-height=550}
---------------------------------
### Graph
```{r 2023 Joint}
plot_ly(
type = "sankey",
arrangement = "snap",
node = list(
label = labels_23,
customdata = node_names(labels_23),
x = c(0, 0.15, 0.15, 0.15, 0.15, 0.25, 0.4, 0.4, 0.4, 0.4, 0.5, 0.65, 0.8, 1),
y = c(0, -0.2, 0.18, 0.23, 0.6, 0.5, 0.32, 0.38, 0.42, 0.52, 0.5, 0.53, 0.5, 0.5),
color = "gray",
hovertemplate = node_hover,
thickness = 10,
pad = 10), # 10 Pixel
link = list(
source = as.numeric(com_23$x) - 1,
target = as.numeric(com_23$next_x),
customdata = flow_names(com_23),
value = com_23$n,
color = ~as.factor(com_23$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
))%>%
layout(title = "Sierra by Committee in 2023",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
```
### Return Sankey
```{r 2023 Shell}
shell23 <- sierra_data_shell(csv23)
labs <- c("Introduced", "Passed Committee 1", "Passed Floor 1",
"Passed Committee 2", "Passed Floor 2",
"Delivered to Governor", "Signed by Governor", "Law", "Dead")
plot_ly(
type = "sankey",
arrangement = "snap",
node = list(
label = labs,
customdata = node_names(labs),
x = c(0, 0.23, 0.35, 0.5, 0.6, 0.75, 0.9),
y = c(0.5, 0.5, 0.5, 0.29, 0.4, 0.5, 0.3),
color = "gray",
hovertemplate = node_hover,
pad = 10), # 10 Pixel
link = list(
source = as.numeric(shell23$x) - 1,
target = as.numeric(shell23$next_x) - 1,
customdata = flow_names(shell23),
value = shell23$n,
color = ~as.factor(shell23$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
))%>%
layout(title = "Sankey Diagram with Returned Bills 2023",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
```
### Dead Sankey
```{r 2023 Dead}
dead23 <- sierra_data_dead(csv23)
labs <- c("Introduced", "Passed Committee 1", "Passed Floor 1",
"Passed Committee 2", "Passed Floor 2",
"Delivered to Governor", "Signed by Governor", "Law", "Dead")
plot_ly(
type = "sankey",
arrangement = "snap",
node = list(
label = labs,
customdata = node_names(labs),
x = c(0, 0.23, 0.35, 0.45, 0.6, 0.75, 0.9, 1, 1),
y = c(0.3, 0.62, 0.42, 0.36, 0.23, 0.35, -0.05, -0.2, 0.7),
color = "gray",
hovertemplate = node_hover,
pad = 10), # 10 Pixel
link = list(
source = as.numeric(dead23$x) - 1,
target = as.numeric(dead23$next_x) - 1,
customdata = flow_names(dead23),
value = dead23$n,
color = ~as.factor(dead23$color),
hovertemplate = link_hover,
line = list(color = "black", width = 0.5)
))%>%
layout(title = "Sankey Diagram with Dead Bills 2023",
xaxis = list(showgrid = F, zeroline = F),
yaxis = list(showgrid = F, zeroline = F),
showlegend = T)
```
### Line Graph
```{r}
line_graph(csv23, 2023)
```
Row
---------------------------------
### Table {data-width=600}
```{r}
rtable(csv23)
```
### Description
Governor: Glenn Youngkin - Senate Composition: 21D:18R - House Composition: 48D:52R
This is currently the final year of the Virginia Climate Case Study.
# Charts {data-orientation=rows}
Here are a handful of tables for Dr. Scerri's accompanying report
```{r}
source("functions.R")
source("outdated/functions_table.R")
library(data.table)
library(formattable)
csv15 <- read.csv("data/csv_2015.csv") %>% col_care() %>% add_identifiers() %>% mutate(Year = 2015) %>%
separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";") %>% filter(Disposition != "JRP")
csv16 <- read.csv("data/csv_2016.csv", nrows = 74) %>% col_care() %>% add_identifiers() %>% mutate(Year = 2016) %>%
separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";") %>% filter(Disposition != "JRP")
csv17 <- read.csv("data/csv_2017.csv", nrows = 89) %>% col_care() %>% add_identifiers() %>% mutate(Year = 2017) %>%
separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";") %>% filter(Disposition != "JRP")
csv18 <- read.csv("data/csv_2018.csv", nrows = 111) %>% col_care() %>% add_identifiers() %>% mutate(Year = 2018) %>%
separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";") %>% filter(Disposition != "JRP")
csv19 <- read.csv("data/csv_2019.csv", nrows = 92) %>% col_care() %>% add_identifiers() %>% mutate(Year = 2019) %>%
separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";") %>% filter(Disposition != "JRP")
csv20 <- read.csv("data/csv_2020.csv", nrows = 92) %>% col_care() %>% add_identifiers() %>% mutate(Year = 2020) %>%
separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";") %>% filter(Disposition != "JRP")
csv21 <- read.csv("data/csv_2021.csv", nrows = 84) %>% col_care() %>% add_identifiers() %>% mutate(Year = 2021) %>%
separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";") %>% filter(Disposition != "JRP")
csv22 <- read.csv("data/csv_2022.csv", nrows = 132) %>% col_care() %>% add_identifiers() %>% mutate(Year = 2022) %>%
separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";")
csv_total <- rbind(csv15, csv16, csv17, csv18, csv19, csv20, csv21, csv22) %>%
mutate(Com.1 = if_else(Com.1 == "H-CL" | Com.1 == "H-LC", "H-CL/LC", Com.1),
Com.2 = if_else(Com.2 == "H-CL" | Com.2 == "H-LC", "H-CL/LC", Com.2))
csv <- rbind(csv15, csv16, csv17, csv18, csv19, csv20, csv21, csv22) %>%
mutate(Com.1 = if_else(Com.1 == "H-CL" | Com.1 == "H-LC", "H-CL/LC", Com.1),
Com.2 = if_else(Com.2 == "H-CL" | Com.2 == "H-LC", "H-CL/LC", Com.2))
null15 <- read.csv("data/null_2015.csv") %>% mutate(Year = 2015) %>% separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";")
null16 <- read.csv("data/null_2016.csv") %>% mutate(Year = 2016) %>% separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";")
null17 <- read.csv("data/null_2017.csv") %>% mutate(Year = 2017) %>% separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";")
null18 <- read.csv("data/null_2018.csv") %>% mutate(Year = 2018) %>% separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";")
null19 <- read.csv("data/null_2019.csv") %>% mutate(Year = 2019) %>% separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";")
null20 <- read.csv("data/null_2020.csv") %>% mutate(Year = 2020) %>% separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";")
null21 <- read.csv("data/null_2021.csv") %>% mutate(Year = 2021) %>% separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";")
#null22 <- read.csv("data/null_2022.csv") %>% mutate(Year = 2022) %>% separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";")
null_total <- rbind(null15, null16, null17, null18, null19, null20, null21)
ed15 <- read.csv("data/null_ed_2015.csv") %>% mutate(Year = 2015) %>% separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";")
ed16 <- read.csv("data/null_ed_2016.csv") %>% mutate(Year = 2016) %>% separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";")
ed17 <- read.csv("data/null_ed_2017.csv") %>% mutate(Year = 2017) %>% separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";")
ed18 <- read.csv("data/null_ed_2018.csv") %>% mutate(Year = 2018) %>% separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";")
ed19 <- read.csv("data/null_ed_2019.csv") %>% mutate(Year = 2019) %>% separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";")
ed20 <- read.csv("data/null_ed_2020.csv") %>% mutate(Year = 2020) %>% separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";")
ed21 <- read.csv("data/null_ed_2021.csv") %>% mutate(Year = 2021) %>% separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";")
ed22 <- read.csv("data/null_ed_2022.csv") %>% mutate(Year = 2022) %>% separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";")
ed_total <- rbind(ed15, ed16, ed17, ed18, ed19, ed20, ed21, ed22)
tr15 <- read.csv("data/null_tr_2015.csv") %>% mutate(Year = 2015) %>% separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";")
tr16 <- read.csv("data/null_tr_2016.csv") %>% mutate(Year = 2016) %>% separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";")
tr17 <- read.csv("data/null_tr_2017.csv") %>% mutate(Year = 2017) %>% separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";")
tr18 <- read.csv("data/null_tr_2018.csv") %>% mutate(Year = 2018) %>% separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";")
tr19 <- read.csv("data/null_tr_2019.csv") %>% mutate(Year = 2019) %>% separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";")
tr20 <- read.csv("data/null_tr_2020.csv") %>% mutate(Year = 2020) %>% separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";")
tr21 <- read.csv("data/null_tr_2021.csv") %>% mutate(Year = 2021) %>% separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";")
tr22 <- read.csv("data/null_tr_2022.csv") %>% mutate(Year = 2022) %>% separate(Com.1, into = c("Com.1", "Com.1.2", "Com.1.3", "Com.1.4"), sep = ";")
tr_total <- rbind(tr15, tr16, tr17, tr18, tr19, tr20, tr21, tr22)
```
## Column 1
### Table 1
Trajectory of bills per year
```{r}
t1_15 <- c(nrow(csv15), sum(csv15$Pass.Com.1, na.rm = TRUE), sum(csv15$Pass.Floor.1, na.rm = TRUE), sum(csv15$Pass.Com.2, na.rm = TRUE), sum(csv15$Pass.Floor.2, na.rm = TRUE), sum(csv15$To.Gov, na.rm = TRUE), sum(csv15$Passed, na.rm = TRUE))
t1_16 <- c(nrow(csv16), sum(csv16$Pass.Com.1, na.rm = TRUE), sum(csv16$Pass.Floor.1, na.rm = TRUE), sum(csv16$Pass.Com.2, na.rm = TRUE), sum(csv16$Pass.Floor.2, na.rm = TRUE), sum(csv16$To.Gov, na.rm = TRUE), sum(csv16$Passed, na.rm = TRUE))
t1_17 <- c(nrow(csv17), sum(csv17$Pass.Com.1, na.rm = TRUE), sum(csv17$Pass.Floor.1, na.rm = TRUE), sum(csv17$Pass.Com.2, na.rm = TRUE), sum(csv17$Pass.Floor.2, na.rm = TRUE), sum(csv17$To.Gov, na.rm = TRUE), sum(csv17$Passed, na.rm = TRUE))
t1_18 <- c(nrow(csv18), sum(csv18$Pass.Com.1, na.rm = TRUE), sum(csv18$Pass.Floor.1, na.rm = TRUE), sum(csv18$Pass.Com.2, na.rm = TRUE), sum(csv18$Pass.Floor.2, na.rm = TRUE), sum(csv18$To.Gov, na.rm = TRUE), sum(csv18$Passed, na.rm = TRUE))
t1_19 <- c(nrow(csv19), sum(csv19$Pass.Com.1, na.rm = TRUE), sum(csv19$Pass.Floor.1, na.rm = TRUE), sum(csv19$Pass.Com.2, na.rm = TRUE), sum(csv19$Pass.Floor.2, na.rm = TRUE), sum(csv19$To.Gov, na.rm = TRUE), sum(csv19$Passed, na.rm = TRUE))
t1_20 <- c(nrow(csv20), sum(csv20$Pass.Com.1, na.rm = TRUE), sum(csv20$Pass.Floor.1, na.rm = TRUE), sum(csv20$Pass.Com.2, na.rm = TRUE), sum(csv20$Pass.Floor.2, na.rm = TRUE), sum(csv20$To.Gov, na.rm = TRUE), sum(csv20$Passed, na.rm = TRUE))
t1_21 <- c(nrow(csv21), sum(csv21$Pass.Com.1, na.rm = TRUE), sum(csv21$Pass.Floor.1, na.rm = TRUE), sum(csv21$Pass.Com.2, na.rm = TRUE), sum(csv21$Pass.Floor.2, na.rm = TRUE), sum(csv21$To.Gov, na.rm = TRUE), sum(csv21$Passed, na.rm = TRUE))
t1_22 <- c(nrow(csv22), sum(csv22$Pass.Com.1, na.rm = TRUE), sum(csv22$Pass.Floor.1, na.rm = TRUE), sum(csv22$Pass.Com.2, na.rm = TRUE), sum(csv22$Pass.Floor.2, na.rm = TRUE), sum(csv22$To.Gov, na.rm = TRUE), sum(csv22$Passed, na.rm = TRUE))
t1 <- (data.frame(t1_15, t1_16, t1_17, t1_18, t1_19, t1_20, t1_21, t1_22))
colnames(t1) <- c(2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022)
rownames(t1) <- c("Bill Introduced", "Passed Committee 1", "Passed Floor 1", "Passed Committee 2", "Passed Floor 2", "Delivered to Governor", "Signed into Law")
formattable(t1)
#t1_22 <- c(nrow(csv22), sum(csv22$Pass.Com.1, na.rm = TRUE), sum(csv22$Pass.Floor.1, na.rm = TRUE), sum(csv22$Pass.Com.2, na.rm = TRUE), sum(csv22$Pass.Floor.2, na.rm = TRUE), sum(csv22$To.Gov, na.rm = TRUE), sum(csv22$Passed, na.rm = TRUE))
```
### Table 2
Trajectory of bills per Sierra Club position
```{r}
pos15 <- filter(csv15, SC.Position == 1)
neut15 <- filter(csv15, SC.Position == 0)
neg15 <- filter(csv15, SC.Position == -1)
pos16 <- filter(csv16, SC.Position == 1)
neut16 <- filter(csv16, SC.Position == 0)
neg16 <- filter(csv16, SC.Position == -1)
pos17 <- filter(csv17, SC.Position == 1)
neut17 <- filter(csv17, SC.Position == 0)
neg17 <- filter(csv17, SC.Position == -1)
pos18 <- filter(csv18, SC.Position == 1)
neut18 <- filter(csv18, SC.Position == 0)
neg18 <- filter(csv18, SC.Position == -1)
pos19 <- filter(csv19, SC.Position == 1)
neut19 <- filter(csv19, SC.Position == 0)
neg19 <- filter(csv19, SC.Position == -1)
pos20 <- filter(csv20, SC.Position == 1)
neut20 <- filter(csv20, SC.Position == 0)
neg20 <- filter(csv20, SC.Position == -1)
pos21 <- filter(csv21, SC.Position == 1)
neut21 <- filter(csv21, SC.Position == 0)
neg21 <- filter(csv21, SC.Position == -1)
pos22 <- filter(csv22, SC.Position == 1)
neut22 <- filter(csv22, SC.Position == 0)
neg22 <- filter(csv22, SC.Position == -1)
```
```{r}
#daf <- group_by(csv_total, Year, Dis) %>%
# summarize(n = n())
#formattable(as.data.frame.matrix(table(csv_total$Pos, csv_total$Year)))
t2_15 <- c(nrow(pos15), sum(pos15$Pass.Com.1, na.rm = TRUE), sum(pos15$Pass.Floor.1, na.rm = TRUE), sum(pos15$Pass.Com.2, na.rm = TRUE), sum(pos15$Pass.Floor.2, na.rm = TRUE), sum(pos15$To.Gov, na.rm = TRUE), sum(pos15$Passed, na.rm = TRUE))
t2_16 <- c(nrow(pos16), sum(pos16$Pass.Com.1, na.rm = TRUE), sum(pos16$Pass.Floor.1, na.rm = TRUE), sum(pos16$Pass.Com.2, na.rm = TRUE), sum(pos16$Pass.Floor.2, na.rm = TRUE), sum(pos16$To.Gov, na.rm = TRUE), sum(pos16$Passed, na.rm = TRUE))
t2_17 <- c(nrow(pos17), sum(pos17$Pass.Com.1, na.rm = TRUE), sum(pos17$Pass.Floor.1, na.rm = TRUE), sum(pos17$Pass.Com.2, na.rm = TRUE), sum(pos17$Pass.Floor.2, na.rm = TRUE), sum(pos17$To.Gov, na.rm = TRUE), sum(pos17$Passed, na.rm = TRUE))
t2_18 <- c(nrow(pos18), sum(pos18$Pass.Com.1, na.rm = TRUE), sum(pos18$Pass.Floor.1, na.rm = TRUE), sum(pos18$Pass.Com.2, na.rm = TRUE), sum(pos18$Pass.Floor.2, na.rm = TRUE), sum(pos18$To.Gov, na.rm = TRUE), sum(pos18$Passed, na.rm = TRUE))
t2_19 <- c(nrow(pos19), sum(pos19$Pass.Com.1, na.rm = TRUE), sum(pos19$Pass.Floor.1, na.rm = TRUE), sum(pos19$Pass.Com.2, na.rm = TRUE), sum(pos19$Pass.Floor.2, na.rm = TRUE), sum(pos19$To.Gov, na.rm = TRUE), sum(pos19$Passed, na.rm = TRUE))
t2_20 <- c(nrow(pos20), sum(pos20$Pass.Com.1, na.rm = TRUE), sum(pos20$Pass.Floor.1, na.rm = TRUE), sum(pos20$Pass.Com.2, na.rm = TRUE), sum(pos20$Pass.Floor.2, na.rm = TRUE), sum(pos20$To.Gov, na.rm = TRUE), sum(pos20$Passed, na.rm = TRUE))
t2_21 <- c(nrow(pos21), sum(pos21$Pass.Com.1, na.rm = TRUE), sum(pos21$Pass.Floor.1, na.rm = TRUE), sum(pos21$Pass.Com.2, na.rm = TRUE), sum(pos21$Pass.Floor.2, na.rm = TRUE), sum(pos21$To.Gov, na.rm = TRUE), sum(pos21$Passed, na.rm = TRUE))
t2_22 <- c(nrow(pos22), sum(pos22$Pass.Com.1, na.rm = TRUE), sum(pos22$Pass.Floor.1, na.rm = TRUE), sum(pos22$Pass.Com.2, na.rm = TRUE), sum(pos22$Pass.Floor.2, na.rm = TRUE), sum(pos22$To.Gov, na.rm = TRUE), sum(pos22$Passed, na.rm = TRUE))
t2a <- (data.frame(t2_15, t2_16, t2_17, t2_18, t2_19, t2_20, t2_21, t2_22))
t2pos <- t2a
colnames(t2pos) <-paste0("pos", c(2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022))
colnames(t2a) <- c(2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022)
rownames(t2a) <- c("Bill Introduced", "Passed Committee 1", "Passed Floor 1", "Passed Committee 2", "Passed Floor 2", "Delivered to Governor", "Signed into Law")
```
```{r}
t2_15 <- c(nrow(neut15), sum(neut15$Pass.Com.1, na.rm = TRUE), sum(neut15$Pass.Floor.1, na.rm = TRUE), sum(neut15$Pass.Com.2, na.rm = TRUE), sum(neut15$Pass.Floor.2, na.rm = TRUE), sum(neut15$To.Gov, na.rm = TRUE), sum(neut15$Passed, na.rm = TRUE))
t2_16 <- c(nrow(neut16), sum(neut16$Pass.Com.1, na.rm = TRUE), sum(neut16$Pass.Floor.1, na.rm = TRUE), sum(neut16$Pass.Com.2, na.rm = TRUE), sum(neut16$Pass.Floor.2, na.rm = TRUE), sum(neut16$To.Gov, na.rm = TRUE), sum(neut16$Passed, na.rm = TRUE))
t2_17 <- c(nrow(neut17), sum(neut17$Pass.Com.1, na.rm = TRUE), sum(neut17$Pass.Floor.1, na.rm = TRUE), sum(neut17$Pass.Com.2, na.rm = TRUE), sum(neut17$Pass.Floor.2, na.rm = TRUE), sum(neut17$To.Gov, na.rm = TRUE), sum(neut17$Passed, na.rm = TRUE))
t2_18 <- c(nrow(neut18), sum(neut18$Pass.Com.1, na.rm = TRUE), sum(neut18$Pass.Floor.1, na.rm = TRUE), sum(neut18$Pass.Com.2, na.rm = TRUE), sum(neut18$Pass.Floor.2, na.rm = TRUE), sum(neut18$To.Gov, na.rm = TRUE), sum(neut18$Passed, na.rm = TRUE))
t2_19 <- c(nrow(neut19), sum(neut19$Pass.Com.1, na.rm = TRUE), sum(neut19$Pass.Floor.1, na.rm = TRUE), sum(neut19$Pass.Com.2, na.rm = TRUE), sum(neut19$Pass.Floor.2, na.rm = TRUE), sum(neut19$To.Gov, na.rm = TRUE), sum(neut19$Passed, na.rm = TRUE))
t2_20 <- c(nrow(neut20), sum(neut20$Pass.Com.1, na.rm = TRUE), sum(neut20$Pass.Floor.1, na.rm = TRUE), sum(neut20$Pass.Com.2, na.rm = TRUE), sum(neut20$Pass.Floor.2, na.rm = TRUE), sum(neut20$To.Gov, na.rm = TRUE), sum(neut20$Passed, na.rm = TRUE))
t2_21 <- c(nrow(neut21), sum(neut21$Pass.Com.1, na.rm = TRUE), sum(neut21$Pass.Floor.1, na.rm = TRUE), sum(neut21$Pass.Com.2, na.rm = TRUE), sum(neut21$Pass.Floor.2, na.rm = TRUE), sum(neut21$To.Gov, na.rm = TRUE), sum(neut21$Passed, na.rm = TRUE))
t2_22 <- c(nrow(neut22), sum(neut22$Pass.Com.1, na.rm = TRUE), sum(neut22$Pass.Floor.1, na.rm = TRUE), sum(neut22$Pass.Com.2, na.rm = TRUE), sum(neut22$Pass.Floor.2, na.rm = TRUE), sum(neut22$To.Gov, na.rm = TRUE), sum(neut22$Passed, na.rm = TRUE))
t2b <- (data.frame(t2_15, t2_16, t2_17, t2_18, t2_19, t2_20, t2_21, t2_22))
t2neut <- t2b
colnames(t2neut) <- paste0("neut", c(2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022))
colnames(t2b) <- c(2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022)
rownames(t2b) <- c("Bill Introduced", "Passed Committee 1", "Passed Floor 1", "Passed Committee 2", "Passed Floor 2", "Delivered to Governor", "Signed into Law")
```
```{r}
t2_15 <- c(nrow(neg15), sum(neg15$Pass.Com.1, na.rm = TRUE), sum(neg15$Pass.Floor.1, na.rm = TRUE), sum(neg15$Pass.Com.2, na.rm = TRUE), sum(neg15$Pass.Floor.2, na.rm = TRUE), sum(neg15$To.Gov, na.rm = TRUE), sum(neg15$Passed, na.rm = TRUE))
t2_16 <- c(nrow(neg16), sum(neg16$Pass.Com.1, na.rm = TRUE), sum(neg16$Pass.Floor.1, na.rm = TRUE), sum(neg16$Pass.Com.2, na.rm = TRUE), sum(neg16$Pass.Floor.2, na.rm = TRUE), sum(neg16$To.Gov, na.rm = TRUE), sum(neg16$Passed, na.rm = TRUE))
t2_17 <- c(nrow(neg17), sum(neg17$Pass.Com.1, na.rm = TRUE), sum(neg17$Pass.Floor.1, na.rm = TRUE), sum(neg17$Pass.Com.2, na.rm = TRUE), sum(neg17$Pass.Floor.2, na.rm = TRUE), sum(neg17$To.Gov, na.rm = TRUE), sum(neg17$Passed, na.rm = TRUE))
t2_18 <- c(nrow(neg18), sum(neg18$Pass.Com.1, na.rm = TRUE), sum(neg18$Pass.Floor.1, na.rm = TRUE), sum(neg18$Pass.Com.2, na.rm = TRUE), sum(neg18$Pass.Floor.2, na.rm = TRUE), sum(neg18$To.Gov, na.rm = TRUE), sum(neg18$Passed, na.rm = TRUE))
t2_19 <- c(nrow(neg19), sum(neg19$Pass.Com.1, na.rm = TRUE), sum(neg19$Pass.Floor.1, na.rm = TRUE), sum(neg19$Pass.Com.2, na.rm = TRUE), sum(neg19$Pass.Floor.2, na.rm = TRUE), sum(neg19$To.Gov, na.rm = TRUE), sum(neg19$Passed, na.rm = TRUE))
t2_20 <- c(nrow(neg20), sum(neg20$Pass.Com.1, na.rm = TRUE), sum(neg20$Pass.Floor.1, na.rm = TRUE), sum(neg20$Pass.Com.2, na.rm = TRUE), sum(neg20$Pass.Floor.2, na.rm = TRUE), sum(neg20$To.Gov, na.rm = TRUE), sum(neg20$Passed, na.rm = TRUE))
t2_21 <- c(nrow(neg21), sum(neg21$Pass.Com.1, na.rm = TRUE), sum(neg21$Pass.Floor.1, na.rm = TRUE), sum(neg21$Pass.Com.2, na.rm = TRUE), sum(neg21$Pass.Floor.2, na.rm = TRUE), sum(neg21$To.Gov, na.rm = TRUE), sum(neg21$Passed, na.rm = TRUE))
t2_22 <- c(nrow(neg22), sum(neg22$Pass.Com.1, na.rm = TRUE), sum(neg22$Pass.Floor.1, na.rm = TRUE), sum(neg22$Pass.Com.2, na.rm = TRUE), sum(neg22$Pass.Floor.2, na.rm = TRUE), sum(neg22$To.Gov, na.rm = TRUE), sum(neg22$Passed, na.rm = TRUE))
t2c <- (data.frame(t2_15, t2_16, t2_17, t2_18, t2_19, t2_20, t2_21, t2_22))
t2neg <- t2c
colnames(t2neg) <- paste0("neg", c(2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022))
colnames(t2c) <- c(2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022)
rownames(t2c) <- c("Bill Introduced", "Passed Committee 1", "Passed Floor 1", "Passed Committee 2", "Passed Floor 2", "Delivered to Governor", "Signed into Law")
```
```{r}
library(gt)
tot <- cbind(t2pos, t2neut, t2neg) %>%
cbind("process" = rownames(t2a))
tab <- gt(tot, rowname_col = "process") %>%
tab_spanner(
label = "2015",
columns = c(pos2015, neut2015, neg2015)
) %>%
tab_spanner(
label = "2016",
columns = c(pos2016, neut2016, neg2016)
) %>%
tab_spanner(
label = "2017",
columns = c(pos2017, neut2017, neg2017)
) %>%
tab_spanner(
label = "2018",
columns = c(pos2018, neut2018, neg2018)
) %>%
tab_spanner(
label = "2019",
columns = c(pos2019, neut2019, neg2019)
) %>%
tab_spanner(
label = "2020",
columns = c(pos2020, neut2020, neg2020)
) %>%
tab_spanner(
label = "2021",
columns = c(pos2021, neut2021, neg2021)
) %>%
tab_spanner(
label = "2022",
columns = c(pos2022, neut2022, neg2022)
) %>%
cols_label(
pos2015 = "",
neut2015 = "",
neg2015 = "",
pos2016 = "",
neut2016 = "",
neg2016 = "",
pos2017 = "",
neut2017 = "",
neg2017 = "",
pos2018 = "",
neut2018 = "",
neg2018 = "",
pos2019 = "",
neut2019 = "",
neg2019 = "",
pos2020 = "",
neut2020 = "",
neg2020 = "",
pos2021 = "",
neut2021 = "",
neg2021 = "",
pos2022 = "",
neut2022 = "",
neg2022 = "",
)
```
```{r}
tab_style(tab, style = list(
cell_fill(color = "rgba(154,205,50,1.0)")
),
locations = cells_body(
columns = c(pos2015, pos2016, pos2017, pos2018, pos2019, pos2019, pos2020, pos2021, pos2022)
)
) %>%
tab_style(style = list(
cell_fill(color = "rgba(176,224,230,1.0)")
),
locations = cells_body(
columns = c(neut2015, neut2016, neut2017, neut2018, neut2019, neut2019, neut2020, neut2021, neut2022)
)
) %>%
tab_style(style = list(
cell_fill(color = "rgba(255,69,0,1.0)")
),
locations = cells_body(
columns = c(neg2015, neg2016, neg2017, neg2018, neg2019, neg2019, neg2020, neg2021, neg2022)
)
)
```
## Column 2
### Education per Year
```{r}
t1_15 <- c(nrow(ed15), sum(ed15$Pass.Com.1, na.rm = TRUE), sum(ed15$Pass.Floor.1, na.rm = TRUE), sum(ed15$Pass.Com.2, na.rm = TRUE), sum(ed15$Pass.Floor.2, na.rm = TRUE), sum(ed15$To.Gov, na.rm = TRUE), sum(ed15$Passed, na.rm = TRUE))
t1_16 <- c(nrow(ed16), sum(ed16$Pass.Com.1, na.rm = TRUE), sum(ed16$Pass.Floor.1, na.rm = TRUE), sum(ed16$Pass.Com.2, na.rm = TRUE), sum(ed16$Pass.Floor.2, na.rm = TRUE), sum(ed16$To.Gov, na.rm = TRUE), sum(ed16$Passed, na.rm = TRUE))
t1_17 <- c(nrow(ed17), sum(ed17$Pass.Com.1, na.rm = TRUE), sum(ed17$Pass.Floor.1, na.rm = TRUE), sum(ed17$Pass.Com.2, na.rm = TRUE), sum(ed17$Pass.Floor.2, na.rm = TRUE), sum(ed17$To.Gov, na.rm = TRUE), sum(ed17$Passed, na.rm = TRUE))
t1_18 <- c(nrow(ed18), sum(ed18$Pass.Com.1, na.rm = TRUE), sum(ed18$Pass.Floor.1, na.rm = TRUE), sum(ed18$Pass.Com.2, na.rm = TRUE), sum(ed18$Pass.Floor.2, na.rm = TRUE), sum(ed18$To.Gov, na.rm = TRUE), sum(ed18$Passed, na.rm = TRUE))
t1_19 <- c(nrow(ed19), sum(ed19$Pass.Com.1, na.rm = TRUE), sum(ed19$Pass.Floor.1, na.rm = TRUE), sum(ed19$Pass.Com.2, na.rm = TRUE), sum(ed19$Pass.Floor.2, na.rm = TRUE), sum(ed19$To.Gov, na.rm = TRUE), sum(ed19$Passed, na.rm = TRUE))
t1_20 <- c(nrow(ed20), sum(ed20$Pass.Com.1, na.rm = TRUE), sum(ed20$Pass.Floor.1, na.rm = TRUE), sum(ed20$Pass.Com.2, na.rm = TRUE), sum(ed20$Pass.Floor.2, na.rm = TRUE), sum(ed20$To.Gov, na.rm = TRUE), sum(ed20$Passed, na.rm = TRUE))
t1_21 <- c(nrow(ed21), sum(ed21$Pass.Com.1, na.rm = TRUE), sum(ed21$Pass.Floor.1, na.rm = TRUE), sum(ed21$Pass.Com.2, na.rm = TRUE), sum(ed21$Pass.Floor.2, na.rm = TRUE), sum(ed21$To.Gov, na.rm = TRUE), sum(ed21$Passed, na.rm = TRUE))
t1_22 <- c(nrow(ed22), sum(ed22$Pass.Com.1, na.rm = TRUE), sum(ed22$Pass.Floor.1, na.rm = TRUE), sum(ed22$Pass.Com.2, na.rm = TRUE), sum(ed22$Pass.Floor.2, na.rm = TRUE), sum(ed22$To.Gov, na.rm = TRUE), sum(ed22$Passed, na.rm = TRUE))
t1 <- (data.frame(t1_15, t1_16, t1_17, t1_18, t1_19, t1_20, t1_21, t1_22))
colnames(t1) <- c(2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022)
rownames(t1) <- c("Bill Introduced", "Passed Committee 1", "Passed Floor 1", "Passed Committee 2", "Passed Floor 2", "Delivered to Governor", "Signed into Law")
formattable(t1)
```
### Table 3
Trajectory of education control
```{r}
pos15 <- filter(ed15, VEA.Support == 1)
neut15 <- filter(ed15, VEA.Support == 0)
neg15 <- filter(ed15, VEA.Support == -1)
pos16 <- filter(ed16, VEA.Support == 1)
neut16 <- filter(ed16, VEA.Support == 0)
neg16 <- filter(ed16, VEA.Support == -1)
pos17 <- filter(ed17, VEA.Support == 1)
neut17 <- filter(ed17, VEA.Support == 0)
neg17 <- filter(ed17, VEA.Support == -1)
pos18 <- filter(ed18, VEA.Support == 1)
neut18 <- filter(ed18, VEA.Support == 0)
neg18 <- filter(ed18, VEA.Support == -1)
pos19 <- filter(ed19, VEA.Support == 1)
neut19 <- filter(ed19, VEA.Support == 0)
neg19 <- filter(ed19, VEA.Support == -1)
pos20 <- filter(ed20, VEA.Support == 1)
neut20 <- filter(ed20, VEA.Support == 0)
neg20 <- filter(ed20, VEA.Support == -1)
pos21 <- filter(ed21, VEA.Support == 1)
neut21 <- filter(ed21, VEA.Support == 0)
neg21 <- filter(ed21, VEA.Support == -1)
pos22 <- filter(ed22, VEA.Support == 1)
neut22 <- filter(ed22, VEA.Support == 0)
neg22 <- filter(ed22, VEA.Support == -1)
t2_15 <- c(nrow(pos15), sum(pos15$Pass.Com.1, na.rm = TRUE), sum(pos15$Pass.Floor.1, na.rm = TRUE), sum(pos15$Pass.Com.2, na.rm = TRUE), sum(pos15$Pass.Floor.2, na.rm = TRUE), sum(pos15$To.Gov, na.rm = TRUE), sum(pos15$Passed, na.rm = TRUE))
t2_16 <- c(nrow(pos16), sum(pos16$Pass.Com.1, na.rm = TRUE), sum(pos16$Pass.Floor.1, na.rm = TRUE), sum(pos16$Pass.Com.2, na.rm = TRUE), sum(pos16$Pass.Floor.2, na.rm = TRUE), sum(pos16$To.Gov, na.rm = TRUE), sum(pos16$Passed, na.rm = TRUE))
t2_17 <- c(nrow(pos17), sum(pos17$Pass.Com.1, na.rm = TRUE), sum(pos17$Pass.Floor.1, na.rm = TRUE), sum(pos17$Pass.Com.2, na.rm = TRUE), sum(pos17$Pass.Floor.2, na.rm = TRUE), sum(pos17$To.Gov, na.rm = TRUE), sum(pos17$Passed, na.rm = TRUE))
t2_18 <- c(nrow(pos18), sum(pos18$Pass.Com.1, na.rm = TRUE), sum(pos18$Pass.Floor.1, na.rm = TRUE), sum(pos18$Pass.Com.2, na.rm = TRUE), sum(pos18$Pass.Floor.2, na.rm = TRUE), sum(pos18$To.Gov, na.rm = TRUE), sum(pos18$Passed, na.rm = TRUE))
t2_19 <- c(nrow(pos19), sum(pos19$Pass.Com.1, na.rm = TRUE), sum(pos19$Pass.Floor.1, na.rm = TRUE), sum(pos19$Pass.Com.2, na.rm = TRUE), sum(pos19$Pass.Floor.2, na.rm = TRUE), sum(pos19$To.Gov, na.rm = TRUE), sum(pos19$Passed, na.rm = TRUE))
t2_20 <- c(nrow(pos20), sum(pos20$Pass.Com.1, na.rm = TRUE), sum(pos20$Pass.Floor.1, na.rm = TRUE), sum(pos20$Pass.Com.2, na.rm = TRUE), sum(pos20$Pass.Floor.2, na.rm = TRUE), sum(pos20$To.Gov, na.rm = TRUE), sum(pos20$Passed, na.rm = TRUE))
t2_21 <- c(nrow(pos21), sum(pos21$Pass.Com.1, na.rm = TRUE), sum(pos21$Pass.Floor.1, na.rm = TRUE), sum(pos21$Pass.Com.2, na.rm = TRUE), sum(pos21$Pass.Floor.2, na.rm = TRUE), sum(pos21$To.Gov, na.rm = TRUE), sum(pos21$Passed, na.rm = TRUE))
t2_22 <- c(nrow(pos22), sum(pos22$Pass.Com.1, na.rm = TRUE), sum(pos22$Pass.Floor.1, na.rm = TRUE), sum(pos22$Pass.Com.2, na.rm = TRUE), sum(pos22$Pass.Floor.2, na.rm = TRUE), sum(pos22$To.Gov, na.rm = TRUE), sum(pos22$Passed, na.rm = TRUE))
t2a <- (data.frame(t2_15, t2_16, t2_17, t2_18, t2_19, t2_20, t2_21, t2_22))
t2pos <- t2a
colnames(t2pos) <-paste0("pos", c(2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022))
colnames(t2a) <- c(2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022)
rownames(t2a) <- c("Bill Introduced", "Passed Committee 1", "Passed Floor 1", "Passed Committee 2", "Passed Floor 2", "Delivered to Governor", "Signed into Law")
t2_15 <- c(nrow(neut15), sum(neut15$Pass.Com.1, na.rm = TRUE), sum(neut15$Pass.Floor.1, na.rm = TRUE), sum(neut15$Pass.Com.2, na.rm = TRUE), sum(neut15$Pass.Floor.2, na.rm = TRUE), sum(neut15$To.Gov, na.rm = TRUE), sum(neut15$Passed, na.rm = TRUE))
t2_16 <- c(nrow(neut16), sum(neut16$Pass.Com.1, na.rm = TRUE), sum(neut16$Pass.Floor.1, na.rm = TRUE), sum(neut16$Pass.Com.2, na.rm = TRUE), sum(neut16$Pass.Floor.2, na.rm = TRUE), sum(neut16$To.Gov, na.rm = TRUE), sum(neut16$Passed, na.rm = TRUE))
t2_17 <- c(nrow(neut17), sum(neut17$Pass.Com.1, na.rm = TRUE), sum(neut17$Pass.Floor.1, na.rm = TRUE), sum(neut17$Pass.Com.2, na.rm = TRUE), sum(neut17$Pass.Floor.2, na.rm = TRUE), sum(neut17$To.Gov, na.rm = TRUE), sum(neut17$Passed, na.rm = TRUE))
t2_18 <- c(nrow(neut18), sum(neut18$Pass.Com.1, na.rm = TRUE), sum(neut18$Pass.Floor.1, na.rm = TRUE), sum(neut18$Pass.Com.2, na.rm = TRUE), sum(neut18$Pass.Floor.2, na.rm = TRUE), sum(neut18$To.Gov, na.rm = TRUE), sum(neut18$Passed, na.rm = TRUE))
t2_19 <- c(nrow(neut19), sum(neut19$Pass.Com.1, na.rm = TRUE), sum(neut19$Pass.Floor.1, na.rm = TRUE), sum(neut19$Pass.Com.2, na.rm = TRUE), sum(neut19$Pass.Floor.2, na.rm = TRUE), sum(neut19$To.Gov, na.rm = TRUE), sum(neut19$Passed, na.rm = TRUE))
t2_20 <- c(nrow(neut20), sum(neut20$Pass.Com.1, na.rm = TRUE), sum(neut20$Pass.Floor.1, na.rm = TRUE), sum(neut20$Pass.Com.2, na.rm = TRUE), sum(neut20$Pass.Floor.2, na.rm = TRUE), sum(neut20$To.Gov, na.rm = TRUE), sum(neut20$Passed, na.rm = TRUE))
t2_21 <- c(nrow(neut21), sum(neut21$Pass.Com.1, na.rm = TRUE), sum(neut21$Pass.Floor.1, na.rm = TRUE), sum(neut21$Pass.Com.2, na.rm = TRUE), sum(neut21$Pass.Floor.2, na.rm = TRUE), sum(neut21$To.Gov, na.rm = TRUE), sum(neut21$Passed, na.rm = TRUE))
t2_22 <- c(nrow(neut22), sum(neut22$Pass.Com.1, na.rm = TRUE), sum(neut22$Pass.Floor.1, na.rm = TRUE), sum(neut22$Pass.Com.2, na.rm = TRUE), sum(neut22$Pass.Floor.2, na.rm = TRUE), sum(neut22$To.Gov, na.rm = TRUE), sum(neut22$Passed, na.rm = TRUE))
t2b <- (data.frame(t2_15, t2_16, t2_17, t2_18, t2_19, t2_20, t2_21, t2_22))
t2neut <- t2b
colnames(t2neut) <- paste0("neut", c(2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022))
colnames(t2b) <- c(2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022)
rownames(t2b) <- c("Bill Introduced", "Passed Committee 1", "Passed Floor 1", "Passed Committee 2", "Passed Floor 2", "Delivered to Governor", "Signed into Law")
t2_15 <- c(nrow(neg15), sum(neg15$Pass.Com.1, na.rm = TRUE), sum(neg15$Pass.Floor.1, na.rm = TRUE), sum(neg15$Pass.Com.2, na.rm = TRUE), sum(neg15$Pass.Floor.2, na.rm = TRUE), sum(neg15$To.Gov, na.rm = TRUE), sum(neg15$Passed, na.rm = TRUE))
t2_16 <- c(nrow(neg16), sum(neg16$Pass.Com.1, na.rm = TRUE), sum(neg16$Pass.Floor.1, na.rm = TRUE), sum(neg16$Pass.Com.2, na.rm = TRUE), sum(neg16$Pass.Floor.2, na.rm = TRUE), sum(neg16$To.Gov, na.rm = TRUE), sum(neg16$Passed, na.rm = TRUE))
t2_17 <- c(nrow(neg17), sum(neg17$Pass.Com.1, na.rm = TRUE), sum(neg17$Pass.Floor.1, na.rm = TRUE), sum(neg17$Pass.Com.2, na.rm = TRUE), sum(neg17$Pass.Floor.2, na.rm = TRUE), sum(neg17$To.Gov, na.rm = TRUE), sum(neg17$Passed, na.rm = TRUE))
t2_18 <- c(nrow(neg18), sum(neg18$Pass.Com.1, na.rm = TRUE), sum(neg18$Pass.Floor.1, na.rm = TRUE), sum(neg18$Pass.Com.2, na.rm = TRUE), sum(neg18$Pass.Floor.2, na.rm = TRUE), sum(neg18$To.Gov, na.rm = TRUE), sum(neg18$Passed, na.rm = TRUE))
t2_19 <- c(nrow(neg19), sum(neg19$Pass.Com.1, na.rm = TRUE), sum(neg19$Pass.Floor.1, na.rm = TRUE), sum(neg19$Pass.Com.2, na.rm = TRUE), sum(neg19$Pass.Floor.2, na.rm = TRUE), sum(neg19$To.Gov, na.rm = TRUE), sum(neg19$Passed, na.rm = TRUE))
t2_20 <- c(nrow(neg20), sum(neg20$Pass.Com.1, na.rm = TRUE), sum(neg20$Pass.Floor.1, na.rm = TRUE), sum(neg20$Pass.Com.2, na.rm = TRUE), sum(neg20$Pass.Floor.2, na.rm = TRUE), sum(neg20$To.Gov, na.rm = TRUE), sum(neg20$Passed, na.rm = TRUE))
t2_21 <- c(nrow(neg21), sum(neg21$Pass.Com.1, na.rm = TRUE), sum(neg21$Pass.Floor.1, na.rm = TRUE), sum(neg21$Pass.Com.2, na.rm = TRUE), sum(neg21$Pass.Floor.2, na.rm = TRUE), sum(neg21$To.Gov, na.rm = TRUE), sum(neg21$Passed, na.rm = TRUE))
t2_22 <- c(nrow(neg22), sum(neg22$Pass.Com.1, na.rm = TRUE), sum(neg22$Pass.Floor.1, na.rm = TRUE), sum(neg22$Pass.Com.2, na.rm = TRUE), sum(neg22$Pass.Floor.2, na.rm = TRUE), sum(neg22$To.Gov, na.rm = TRUE), sum(neg22$Passed, na.rm = TRUE))
t2c <- (data.frame(t2_15, t2_16, t2_17, t2_18, t2_19, t2_20, t2_21, t2_22))
t2neg <- t2c
colnames(t2neg) <- paste0("neg", c(2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022))
colnames(t2c) <- c(2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022)
rownames(t2c) <- c("Bill Introduced", "Passed Committee 1", "Passed Floor 1", "Passed Committee 2", "Passed Floor 2", "Delivered to Governor", "Signed into Law")
library(gt)
tot <- cbind(t2pos, t2neut, t2neg) %>%
cbind("process" = rownames(t2a))
tab <- gt(tot, rowname_col = "process") %>%
tab_spanner(
label = "2015",
columns = c(pos2015, neut2015, neg2015)
) %>%
tab_spanner(
label = "2016",
columns = c(pos2016, neut2016, neg2016)
) %>%
tab_spanner(
label = "2017",
columns = c(pos2017, neut2017, neg2017)
) %>%
tab_spanner(
label = "2018",
columns = c(pos2018, neut2018, neg2018)
) %>%
tab_spanner(
label = "2019",
columns = c(pos2019, neut2019, neg2019)
) %>%
tab_spanner(
label = "2020",
columns = c(pos2020, neut2020, neg2020)
) %>%
tab_spanner(
label = "2021",
columns = c(pos2021, neut2021, neg2021)
) %>%
tab_spanner(
label = "2022",
columns = c(pos2022, neut2022, neg2022)
) %>%
cols_label(
pos2015 = "",
neut2015 = "",
neg2015 = "",
pos2016 = "",
neut2016 = "",
neg2016 = "",
pos2017 = "",
neut2017 = "",
neg2017 = "",
pos2018 = "",
neut2018 = "",
neg2018 = "",
pos2019 = "",
neut2019 = "",
neg2019 = "",
pos2020 = "",
neut2020 = "",
neg2020 = "",
pos2021 = "",
neut2021 = "",
neg2021 = "",
pos2022 = "",
neut2022 = "",
neg2022 = "",
)
tab_style(tab, style = list(
cell_fill(color = "rgba(154,205,50,1.0)")
),
locations = cells_body(
columns = c(pos2015, pos2016, pos2017, pos2018, pos2019, pos2019, pos2020, pos2021, pos2022)
)
) %>%
tab_style(style = list(
cell_fill(color = "rgba(176,224,230,1.0)")
),
locations = cells_body(
columns = c(neut2015, neut2016, neut2017, neut2018, neut2019, neut2019, neut2020, neut2021, neut2022)
)
) %>%
tab_style(style = list(
cell_fill(color = "rgba(255,69,0,1.0)")
),
locations = cells_body(
columns = c(neg2015, neg2016, neg2017, neg2018, neg2019, neg2019, neg2020, neg2021, neg2022)
)
)
```